PDA

View Full Version : Autoresponder not working?


cambo
10th May 2007, 02:43
Hi
:eek: I give up - I have read every thread with autoresponder in it and can not find the answer.
I have a user with Autoresponder ticked and a message in the box, however when you send an email to the user, there is no response.
There are no forwards (so keep copy is not ticked either) I understand that autorespond script runs after these.
I also understand only one response is sent per sender but there is no response at all.
I have looked in all the config files to check settings as mentioned in other posts but can't find an answer.
Here is user files to start:
.autoresponder.rc

SHELL=/bin/sh # for other shells, this might need adjustment
EMAIL=`formail -zxTo:`

:0 Whc: vacation.lock
# Perform a quick check to see if the mail was addressed to us
#* $^To:.*\<$\LOGNAME\>
# Don't reply to daemons and mailinglists
* !^FROM_DAEMON
# Mail loops are evil
* !^X-Loop: ${EMAIL}
| formail -rD 8192 /var/www/web1/user/web1_kristina/.vacation.cache

:0 ehc # if the name was not in the cache
| (formail -rI"From: kristina@industat.com.au" -I"Precedence: junk" \
-A"X-Loop: ${EMAIL}" ; \
cat /var/www/web1/user/web1_kristina/.vacation.msg \
) | $SENDMAIL -oi -t


.vacation.msg

Hi and thanks for emailing myself. I will be on annual leave from Monday the 7th of May returning to work on Monday 28th of May


.vacation.cache shows about 20 email addresses.

master.cf

#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# The script postfix-chroot.sh can be used to set up a Postfix chroot
# environment on your Mandrivalinux System.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - y - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - n - - qmqpd
pickup fifo n - y 60 1 pickup
-o content_filter=
-o receive_override_options=
cleanup unix n - y - 0 cleanup
qmgr fifo n - y 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - y - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - y - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
#
# Cyrus. Please See the Postfix CYRUS_README file for details
#
# deliver interface (deprecated), to use this also use
# postconf -e cyrus-deliver_destination_recipient_limit=1
cyrus-deliver unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# for default cyrus socket placement
cyrus unix - n n - - lmtp
-o lmtp_cache_connection=yes
#
# if you configure cyrus socket in the chroot jail
cyrus-chroot unix - - y - - lmtp
-o lmtp_cache_connection=yes
#
# for lmtp to cyrus via tcp
cyrus-inet unix - - y - - lmtp
-o lmtp_cache_connection=yes
-o lmtp_sasl_auth_enable=yes
-o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
-o lmtp_sasl_security_options=noanonymous
#
# UUCP. Unix to Unix CoPy
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
# These are not distributed with Mandrivalinux
#
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#bsmtp unix - n n - - pipe
# flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

##### START OF CONTENT FILTER CUSTOMIZATIONS #####
# Please see the Postfix FILTER_README for details.
# These sample entries expect your content filter to
# listen on port 10025 and to inject mail back into
# postfix on port 10026.
#
# to enable such content filter run the command
# postconf -e content_filter=smtp-filter:127.0.0.1:10025
# postconf -e smtp-filter_destination_concurrency_limit=2
# or
# postconf -e content_filter=lmtp-filter:127.0.0.1:10025
# postconf -e lmtp-filter_destination_concurrency_limit=2
# and the command
# postconf -e receive_override_options=no_address_mappings
#

127.0.0.1:10026 inet n - y - - smtpd
-o content_filter=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_delay_reject=no
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_unknown_recipient_chec ks,no_header_body_checks

lmtp-filter unix - - y - - lmtp
-o lmtp_data_done_timeout=1200
-o lmtp_send_xforward_command=yes
-o lmtp_cache_connection=no
-o max_use=20

smtp-filter unix - - y - - smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o max_use=20

##### END OF CONTENT FILTER CUSTOMIZATIONS #####



Sample log entry for this user after autoresponder started.

May 10 04:36:21 mdserver postfix/local[9184]: 624F468A1E: to=<web1_kristina@mdserver.mydomain.com>, orig_to=<kristina@mydomain.com.au>, relay=local, delay=60, delays=15/0/0/46, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)


I can't find any errors or warnings in the logs.

Can someone give me a clue where to look??

TIA
Cambo

till
10th May 2007, 09:49
Is the email address that shall receive the autoresponder message in the .vacation.cache? If yes, remove it from there. The .vacation.cache is used to prevent sending of a utoresponder message multiple times to the same user. So if you test the autoresponder, you will get the message only once.

cambo
12th May 2007, 04:46
Hi Till
OK, that's interesting. I wasn't sure of the function of .vacation.cache. The email addresses are in the cache but an autoresponce was never received. Not even once. I will clear the cache and try again.
If there is not even the first autoresponce sent and the email address is in the cache again, what should I be looking for?
Many thanks
Cambo

till
12th May 2007, 10:34
If there is not even the first autoresponce sent and the email address is in the cache again, what should I be looking for?

Please have a look at your mail log and post all entries that where addded when the mail is received and the autoresponder is sent.

cambo
15th May 2007, 01:34
Hi Till
I checked with the local users who had sent an email to the user and none had received an autoresponce.
I cleared the log and sent again. Same thing - no responce.
I checked the next 5 minutes of log after the mail arrived and there is no sent msg in the log.
It should respond straight away, shouldn't it?
I also checked the errors and warnings logs and they are empty.
I checked the mail queue and there is nothing in there.
The email was delivered to the users inbox.

(I also tried the autoresponder with a different user and same thing)

Here is the relevant extract from /var/log/mail/info:

INCOMING MAIL
May 15 09:02:35 mdserver postfix/smtpd[25871]: connect from unknown[124.191.152.244]
May 15 09:02:36 mdserver postfix/smtpd[25871]: setting up TLS connection from unknown[124.191.152.244]
May 15 09:02:38 mdserver postfix/smtpd[25871]: TLS connection established from unknown[124.191.152.244]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
May 15 09:02:40 mdserver postfix/smtpd[25871]: 0A6A568A25: client=unknown[124.191.152.244]
May 15 09:02:41 mdserver postfix/cleanup[25875]: 0A6A568A25: message-id=<6788c627de88f880cc21e7ea3967b6ad@www.tuxtop.com>
May 15 09:02:41 mdserver postfix/qmgr[7667]: 0A6A568A25: from=<cambo@tuxtop.com>, size=1099, nrcpt=1 (queue active)
May 15 09:02:41 mdserver postfix/smtpd[25871]: disconnect from unknown[124.191.152.244]

USER with Autoresponder on.
May 15 09:03:26 mdserver postfix/local[25880]: 0A6A568A25: to=<web1_kristina@mdserver.mydomain.com>, orig_to=<kristina@mydomain.com.au>, relay=local, delay=46, delays=1.2/0.01/0/45, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
May 15 09:03:26 mdserver postfix/qmgr[7667]: 0A6A568A25: removed

falko
15th May 2007, 14:48
Can you check again that the autoresponder is enabled in the user's .procmailrc file, and that the email address that is supposed to receive the autoresponder is not listed in .vacation.cache?

cambo
16th May 2007, 00:55
Can you check again that the autoresponder is enabled in the user's .procmailrc file, and that the email address that is supposed to receive the autoresponder is not listed in .vacation.cache?

Hi Falko
Here is the users procmail.rc
I have cleared the vacation.cache twice.
I am wondering if there is something wrong in another (related) area??
Like, can I check that the ISPConfig autoresponder script is in the right place or is configured properly?
Or is autoresponder just a function of procmail or postfix?
Could it be my SMTP setup.
I have done a vanilla Mandriva 2006 perfect install on this server.
Thanks
Cambo


## MAILDIR=$HOME/Maildir/
## DEFAULT=$MAILDIR
## ORGMAIL=$MAILDIR

INCLUDERC=/var/www/web1/user/web1_kristina/.mailsize.rc
## INCLUDERC=/var/www/web1/user/web1_kristina/.quota.rc
INCLUDERC=/var/www/web1/user/web1_kristina/.antivirus.rc
## INCLUDERC=/var/www/web1/user/web1_kristina/.local-rules.rc
## INCLUDERC=/var/www/web1/user/web1_kristina/.html-trap.rc
INCLUDERC=/var/www/web1/user/web1_kristina/.spamassassin.rc
INCLUDERC=/var/www/web1/user/web1_kristina/.autoresponder.rc

falko
17th May 2007, 15:27
Can you post the contents of /var/www/web1/user/web1_kristina/.autoresponder.rc?
What's the output of updatedb
locate .vacation.cache?

cambo
22nd May 2007, 02:30
HI Falko
Sorry for the delay but I only work on this system 2 days a week.

contents of /var/www/web1/user/web1_kristina/.autoresponder.rc
SHELL=/bin/sh # for other shells, this might need adjustment
EMAIL=`formail -zxTo:`

:0 Whc: vacation.lock
# Perform a quick check to see if the mail was addressed to us
#* $^To:.*\<$\LOGNAME\>
# Don't reply to daemons and mailinglists
* !^FROM_DAEMON
# Mail loops are evil
* !^X-Loop: ${EMAIL}
| formail -rD 8192 /var/www/web1/user/web1_kristina/.vacation.cache

:0 ehc # if the name was not in the cache
| (formail -rI"From: kristina@industat.com.au" -I"Precedence: junk" \
-A"X-Loop: ${EMAIL}" ; \
cat /var/www/web1/user/web1_kristina/.vacation.msg \
) | $SENDMAIL -oi -t

Result: updatedb
locate .vacation.cache

/var/www/web1/user/web1_ian/.vacation.cache
/var/www/web1/user/web1_kristina/.vacation.cache
/var/www/web1/user/web1_myles/.vacation.cache
/var/www/web1/.vacation.cache
(above is link .vacation.cache -> /var/www/web1/user/web1_admin/.vacation.cache)


Had the same problem with the other 2 users listed as well (ie. When Autoresponder is ticked, NO autoresponce was sent.)

falko
22nd May 2007, 18:03
What's the output of grep web1_kristina /etc/passwd?

cambo
23rd May 2007, 13:36
What's the output of grep web1_kristina /etc/passwd?

grep web1_kristina /etc/passwd
web1_kristina:x:10011:10001:Kristina:/var/www/web1/user/web1_kristina:/bin/false

falko
24th May 2007, 17:43
Is the email address that should receive the autoresponder message already listed in /var/www/web1/user/web1_kristina/.vacation.cache?

cambo
27th May 2007, 04:30
No. I have emptied the cache 3 times and tried again. The email address is in the cache after I send one, but there is no reply at all. I can't find anything in the logs where it has even tried to send a response.
Could it be something related to, but not actually postfix, like DNS, or wrong permissions somewhere?
Thanks for your help
Cambo

falko
28th May 2007, 16:15
Could it be something related to, but not actually postfix, like DNS, or wrong permissions somewhere?

That's possible. Can you post a mail log excerpt from the time when an autoresponder message should get sent?

lapena
8th June 2007, 15:56
Hello,

I've installed a server with Mandriva Free 2007 Spring and ISPConfig.
Autoresponder doesn't work. On ISPConfig I check "Autoresponder", I enter the message and click on "Save".
The '.vacation.msg' contains the text, and the file '.vacation.cache' contains the email addresses who have sent a mail.
Anyway I don't receive back any message (I've already cleared .vacation.cache several times).

I'm still looking for fixing this problem, if anyone could help us it would be fine.

Kindest regards,
lapena

falko
9th June 2007, 11:44
What's in the mail log when an autoresponder should be sent?
Also make sure that your server isn't blacklisted: http://www.mxtoolbox.com/blacklists.aspx
Maybe it tries to send the autoresponder, but it isn't accepted by the receiving server because of some blacklists?

lapena
9th June 2007, 13:20
nothing appears in the log when a answer should be sent (I see the mail coming for the user and being delivered but no answer)
the server isn't blacklisted, more over I've tested locally (sent a mail from the server with another user in the same domain)

falko
10th June 2007, 14:31
Can you check the .procmailrc file in the user's homedir whether the autoresponder is really enabled?

lapena
10th June 2007, 19:46
hello,

here is the output of the .procmailrc file of the user (username is replaced with *):


MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR

INCLUDERC=/var/www/web1/user/****/.mailsize.rc
## INCLUDERC=/var/www/web1/user/****/.quota.rc
INCLUDERC=/var/www/web1/user/****/.antivirus.rc
## INCLUDERC=/var/www/web1/user/****/.local-rules.rc
## INCLUDERC=/var/www/web1/user/****/.html-trap.rc
INCLUDERC=/var/www/web1/user/****/.spamassassin.rc
INCLUDERC=/var/www/web1/user/****/.autoresponder.rc

falko
11th June 2007, 14:30
Looks ok. Then I have no idea why it's not working.

lapena
11th June 2007, 22:26
Hi,

I've just found somethinginteresting. I added this command to the .procmailrc file :
LOGFILE=.procmail-log
Si erverything is logged in this file. Here's the output after one test:

/bin/sh: line 2: -oi: command not found
/bin/sh: /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin: N
o such file or directory
procmail: Program failure (127) of "/home/admispconfig/ispconfig/tools/spamassas
sin/usr/bin/spamassassin"
procmail: Rescue of unfiltered data succeeded
/bin/sh: line 3: -oi: command not found

So I think the problem is that the .autoresponder.rc isn't working well with spamassassin (No such file or directory).

Moreover the error '-oi: command not found' seems to be due to the fact that the system can't lookup $SENDMAIL.


How can I fix $SENDMAIL ? And how can I fix spamassassin error ?


Kindest regards,
lapena

falko
12th June 2007, 13:59
What's the output of which sendmail?
Did you accidentally delete /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin?

lapena
12th June 2007, 15:42
i'm sure I didn't delete this folder, accidentally or not. i really take care before deleting anything.

here's the output of the command which sendmail :
/usr/sbin/sendmail

and as said before, postfix is installed and here is exactly what is installed in /usr/sbin :

ls -al /usr/sbin/sendmail*
lrwxrwxrwx 1 root root 34 jun 4 12:48 /usr/sbin/sendmail -> /etc/alternatives/sendmail-command*
-rwxr-xr-x 1 root root 23776 mar 8 17:19 /usr/sbin/sendmail.postfix*

falko
13th June 2007, 01:44
What's the output of ls -la /etc/alternatives?

lapena
13th June 2007, 12:04
lrwxrwxrwx 1 root root 26 jun 4 12:48 sendmail-command -> /usr/sbin/sendmail.postfix*
lrwxrwxrwx 1 root root 26 jun 4 12:48 sendmail-command-in_libdir -> /usr/sbin/sendmail.postfix*

lapena
13th June 2007, 19:51
as said before, I saw in the log that the variable $SENDMAIL was unknown for procmail.
so I've modified .autoresponder.rc to include this variable. I've added the line above:

SENDMAIL=/usr/sbin/sendmail

and it worked fine, until Ispconfig recreates the file, and this line didn't appear anymore.
where should I write this variable so that it works anytime for any user ?


kindest regards,
lapena

till
13th June 2007, 20:04
You can put it in the procmailrc master template in /root/ispconfig/isp/conf/

lapena
13th June 2007, 20:22
thanks, I'll try this. I'm pretty sure it will work.

and do you have any idea why i don't have this folder :

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin ?

(I'm sure i didn't deleted it - I even looked on history) and do you have any idea on how to recreate it ?

thanks

till
13th June 2007, 20:33
Thats not a folder, it is a file.

lapena
13th June 2007, 21:19
you're right it's a file

but the folder /home/admispconfig/ispconfig/tools/spamassassin/usr/bin doesn't exist. so the file doesn't exist too.

till
14th June 2007, 10:28
If the folder and files does not exist, your ISPConfig is either not installed completely or spamassassin has been deleted.

I recommend to download the latest ISPConfig version, unpack it and run the setup script. It will update your current installation and should "repair" the missing spamassassin too.

cambo
19th June 2007, 01:37
Yay! This solved my issue as well. :D :D :D

as said before, I saw in the log that the variable $SENDMAIL was unknown for procmail.
so I've modified .autoresponder.rc to include this variable. I've added the line above:

SENDMAIL=/usr/sbin/sendmail

and it worked fine, until Ispconfig recreates the file, and this line didn't appear anymore.
where should I write this variable so that it works anytime for any user ?


kindest regards,
lapena

linuxbastard
22nd July 2008, 15:20
Hi till,

I've been reading through the post.

I've followed the solution and it seems to be working until i sent a mail from my gmail account. the autoresponder tried to respond but since it wasn't local mail it had to go through my smtp relay and it got rejected because it's being sent as localuser@local.domain instead of from email@domain.com. here's the last maillog so you could get a better idea.


Jul 22 21:13:35 srv-mkna01 postfix/smtp[13521]: C297B16DB9A: to=<user@yahoo.com>, relay=smtp.*****[*****]:25, delay=3.9, delays=0.41/0.03/3/0.41, dsn=4.1.8, status=deferred (host smtp.****[****] said: 450 4.1.8 <web1_editorial@server01.****>: Sender address rejected: Domain not found (in reply to MAIL FROM command))


basically it's sending mail to non local addresses using a local user instead of the actual email address and it's being rejected by my smtp relay because the domain isn't fully qualified.

any help would be appreciated.

madmucho
23rd July 2008, 13:46
same issue in Mandriva, every version 2007, 2007.1 2008, 2008.1, i must modify every rc script template which send mail and there define variable
SENDMAIL=/usr/sbin/sendmail
if is default no mail is send.

falko
23rd July 2008, 18:59
Hi till,

I've been reading through the post.

I've followed the solution and it seems to be working until i sent a mail from my gmail account. the autoresponder tried to respond but since it wasn't local mail it had to go through my smtp relay and it got rejected because it's being sent as localuser@local.domain instead of from email@domain.com. here's the last maillog so you could get a better idea.


Jul 22 21:13:35 srv-mkna01 postfix/smtp[13521]: C297B16DB9A: to=<user@yahoo.com>, relay=smtp.*****[*****]:25, delay=3.9, delays=0.41/0.03/3/0.41, dsn=4.1.8, status=deferred (host smtp.****[****] said: 450 4.1.8 <web1_editorial@server01.****>: Sender address rejected: Domain not found (in reply to MAIL FROM command))


basically it's sending mail to non local addresses using a local user instead of the actual email address and it's being rejected by my smtp relay because the domain isn't fully qualified.

any help would be appreciated.

Create an A record for server01.****.

linuxbastard
24th July 2008, 02:30
Hi falko,

thanks for the reply but i guess i need a little more info.

Create an A record for server01.****.

Where do i create an A-record? On my local DNS server or on the one who handles my domains DNS records?

Wouldn't it create a problem if one of the domains I'm hosting is the one I have in my local hosts file? like if my local server name is server01.domain.com and one of my websites is domain.com?

linuxbastard
24th July 2008, 04:18
Apparently after I upgraded to ISPconfig 2.2.24, the master autoresponder.rc.master that I edited to add SENDMAIL=/usr/sbin/sendmail was overwritten but the autoresponder still worked even without the workaround. I don't know if it fixed the original issue but autoresponder is working without any modification.

I added a DNS A-record at my DNS maintainer for my server, server01.domain.com, and changed the hosts file and entries in main.cf for postfix and httpd.conf for the ispconfig web. I don't know if that's all I need to change (any ideas?). I also checked via ISPconfig control panel and made sure the DNS entries point to domain.com only for MX records.

Everything seems to be working and I do get email responses even if I send it from a mail address outside of any hosts I have on server01.

Thanks a lot for everything. Hope this helps someone else as well.