autoreply failing

Hi,

autoreply is failing with this as the email going back to the sender.

Failed to open autoreply file /home/<domain>/autoreply-<user><domain>.txt : No such file or directory

When I check the directory the file is there WITH the ‘@’ symbol.

ie /home/<domain>/autoreply-<user>@<domain>.txt

So i renamed the file to
/home/<domain>/autoreply-<user><domain>.txt

and it still fails saying that it couldn’t find the file.

I can see this in the logs

(delivered to command: /etc/webmin/virtual-server/autoreply.pl /home/forceentertainment.com.au/autoreply-chrispforceentertainment.com.au.txt chrisp@forceentertainment.com.au /home/virtualmin-autoreply/11887978886303-autoreply-chrispforceentertainment.com.au.txt)

BTW this feature use to work. I can only imagine that a webmin upgrade has broken it?

The error is this the text file is not being copied to /home/virtualmin-autoreply

If i copy the text file from /home/<domain> to this directory with the right virtualmin id prefix then it work.

Any idea why this is failing?

Are /home/virtualmin-autoreply and /home/domain on different filesystems? Virtualmin doesn’t actually copy that file over - instead, it uses a hard link. However, hard links don’t work across filesystems…

Hi,

Thanks for the reply. Both directories are on the same partition.

any other ideas?

I looked into this further, and was able to re-produce it - it is actually a bug introduced in Virtualmin 3.48. I’ll see if we can get a 3.48-3 minor release out to fix it, as autoreponders are a pretty important feature.

The work-around till then is to make the /home/domain directory world-readable, or to create the hard link manually.

I set up my first auto reply today and found this error happening to me, too. I made the /home/domain directory world readable but that did not fix the problem. The auto-response email is bouncing back saying the file doesn’t exist, when it actually does.

My virtualmin is 3.48.gpl on CentOS Linux 5 (64bit)

How do I create the hard link manually?

Check the file /etc/postfix/aliases for a line like :

replyname: "|/etc/webmin/virtual-server/autoreply.pl /home/domain/autoreply-replyname.txt replyname /var/virtualmin-autoreply/114040121110010-autoreply-replyname.txt"

And then create the link with a command like :

ln /home/domain/autoreply-replyname.txt /var/virtualmin-autoreply/114040121110010-autoreply-replyname.txt

Well I did that and it worked once. And then I had to make a change to the alias (changed the address it forwards to), and Virtualmin deleted the autoreply txt file and now no longer makes a new one for this alias.

Call me crazy, but autoreplies should be a no-brainer feature that doesn’t require workaround hacks to get it to work. Please fix this bug.

You should upgrade to version 3.49, in which this version is fixed. The command :

yum install wbm-virtual-server

should do this for you.

Autoreplies would be a no-brainer if Virtualmin made home directories readable to all other users on the system. But because it makes them only readable by each domain’s owner and users, the mail server (Postfix) doesn’t have permissions to read autoreply message files in the domain’s home directory! So some trickness with a hard link from /var/virtualmin-autoreply is needed to resolve this problem.

I am using 3.49:

Operating system CentOS Linux 5
Webmin version 1.380
Virtualmin version 3.49.gpl (GPL)
Time on server Mon Dec 10 14:34:37 2007

So even after upgrading to 3.49 and creating a new autoreply, it still doesn’t work properly?

If so, could you post :

  • The autoreply line from the /etc/aliases file
  • The output of ls -l run on the file under /var/virtualmin-autoreply specified at the end of that line.
  • The error message from your mail server which appears in /var/log/maillog

I am experiencing the same bug.

How do I upgrade my 3.48 GPL installation to 3.49 on Debian? I did an apt-get upgrade virtualmin, to no avail.

The virtualmin package is named webmin-virtual-server. There is no "virtualmin" package. Confusing, I know. :wink:

3.50 should be in our repos already, and 3.51 is coming out today.

Hi All,

Autoreply is not working on my new Virtualmin install.

Operating system CentOS Linux 5
Webmin version 1.380
Virtualmin version 3.51 (Pro)

How to fix?

Thanks,

Jeff

Jeff - can you give more details. Does the autoreply message simply not get delivered at all, or do you get back some error message?

Also, if possible I’d like to know what gets logged to the file /var/log/maillog when you send email to the autoreply address.

Thanks for the quick reply.

When I send a test message to the account with the autoreply set up, the account receives the message but no autoreply is sent out.

I checked the following:

  • The autoreply line from the /etc/aliases file : There is no autoreply line in /etc/aliases

  • The output of ls -l run on the file under /var/virtualmin-autoreply specified at the end of that line : no such file or directory exists

  • The error message from your mail server which appears in /var/log/maillog : no message regarding autoreplay at all. The email comes in and is delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME. That is it. No errors at all that I can see.

    Any suggestions?

    Regards,

Jeff

Hi Jeff,

It sounds like the autoreply isn’t set up at all … at least not at the Virtualmin level.

Was this done in Virtualmin (on the Edit Mailbox page), or in Usermin on port 20000? If it was the latter, the config file that controls the autoreply will be in the .procmailrc file under the mailbox user’s home directory.

The autoreply was setup in the Usermin Webmail at port 20000. There was no initial need to set it up during the Email user creation in the Virtualmin section.

I have been trying to find where to setup an autoreply in Virtualmin after a user is created, but could not find it. I could only find the autoreply in the Filter and Forward section of the Usermin interface.

I just noticed in the Filter and Forward section of Usermin that there is a message at the top of the page:

Warning - The system is configured to not process user-defined mail filters. Any filters defined below are unlikely to work.

Could this be why the autoreply is not working? If so, how would I enable user-defined mail filters for specific users?

Thanks.

Hi Jamie,

OK, I deleted the test email user account/mailbox in Virtualmin (port 10000) and re-created it.

This time I used the Email Forwarding settings section to create an autoreply with a start and end date of today.

I then sent a test message to the newly recreated account and lo and behold, I received an autoreply back.

I checked the /etc/aliases file and there is now an autoreply line. I checked the /var directory and there is now a virtualmin-autoreply directory with XXXXXX-autoreply-username.domain.txt file there. There is also a ‘autoreply-username.domain.txt’ file in the domain home directory.

As I received the autoreply in response to my test message I assume that there are no error messages in /var/log/maillog, but I checked anyway and I found a successful ‘delivered to command: /etc/webmin/virtual-server/autoreply.pl’ line, so everything seems good there.

My problem now is: How do I disable the autoreply feature after it is no longer needed?

I cannot find any place in Virtualmin that will turn off an autoreply. Nor can I find anything in the Usermin webmail interface to turn off autoreply.

Aside for manually editing the /etc/aliases file and removing the pertinent autoreply line, there does not seem to be any interface for managing the autoreply feature once it has been started.

Also, how do I change the autoreply message for the next time I need to use autoreply?

Any suggestions / help is greatly appreciated.

Thanks,

Jeff