LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2005, 04:02 PM   #1
thierry_b
LQ Newbie
 
Registered: Aug 2004
Posts: 6

Rep: Reputation: 0
problem with an autoreply script that is send 2 times to the sender


Hello,
I've a problem when I try to make a script autoreply for a user in postfix.
I think the problem is due to amavis, because I've made this:

When a mail is sent to thierry@linux.thierry.eu.org (which is a real user with a virtual mailbox), it's forwarded to itself, and to thierry@autoreply.linux.thierry.eu.org, which is used with the transport autoreply.

So the sender receives 2 times the autoreply script.

(this is the interesting lines of master.cf)

smtp inet n - - - - smtpd
smtp-amavis unix - - n - 2 lmtp -o lmtp_data_done_timeout=1200 -o lmtp_send_xforward_command=yes

127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=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
smtp unix - - - - - smtp
autoreply unix - n n - - pipe
flags= user=vmail argv=/home/thierry/autoreply.sh ${recipient} ${sender}
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/local/bin/maildrop -d ${recipient} -f ${sender}

mon script autoreply.sh:
#!/bin/sh

echo -e "Repondeur\n\nJe ne suis pas là pour le moment." |mail -a "From: $1" -s "Essai de repondeur" $2

mon main.cf:
myhostname = debian
mydomain = debian
mydestination = $myhostname
local_recipient_maps = $alias_maps $virtual_mailbox_maps unixasswd.byname
home_mailbox = Maildir/

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes

alias_maps = mysql:/etc/postfix/mysql-aliases.cf
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf

transport_maps = mysql:/etc/postfix/mysql-transport.cf

maildrop_destination_recipient_limit = 1
autoreply_destination_recipient_limit = 1

virtual_transport = maildrop
#virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf
virtual_mailbox_domains = linux.thierry.eu.org
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
#virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf

#OPTIONAL PART
smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject

content_filter=smtp-amavis:[127.0.0.1]:10024

Thanks.
Bye
 
Old 05-20-2009, 03:47 AM   #2
arunns
LQ Newbie
 
Registered: May 2009
Posts: 4

Rep: Reputation: 0
Have you got a solution for this?

I have the same issue, the auto responder is sending twice.

./arun
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: run a script at most 3 times simultanously paterijk Programming 4 08-18-2005 02:49 PM
Bash script to alert by email 3 times then stop. pmpc00 Linux - General 2 11-04-2004 07:23 AM
CGI script problem: Send/Expect command echo on webpage rajatgarg Programming 2 07-11-2004 04:38 PM
hotplug script executed 3 times Borelian Linux - Software 1 06-28-2004 11:46 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration