Dear Sir/Madam;
I am configuring the OFF-LINE MAILSERVER using sendmail8.9,fetchmail & procmail(v3.14). Mailserver is working fine but problem is that
When I received a mail named to a user WHICH IS NOT MENTION IN MY ".promailrc" file ;then this mail is bounce & So my aim is to autoreply to sender with a suitable message. I am using following script but could not working.
# this lines will BOUNCE the mail to the sender - when it is not delivered to
# one of above users ... it will send the file "nosuchuser" into the mail #
body as reply ... be aware ! you need to make such file ! - mine contains #
"well, the user you wanted to reach does not exist on this server, please #
try again, it could be the user is not present anymore".
:0
|(/usr/bin/formail -r -k \
-A"X-loop: mailservice@mydomain.dom "| \
/usr/bin/gawk '{print }\
/^/ && !HEADER \
{ system("/bin/cat nosuchuser"); \
print"--" ;\
HEADER=1 }' ) |\
/usr/bin/sendmail -t
exit
Here i creat a file named nosuchuser in /bin
mailservice = pankaj
mydomain.dom = tevhlinkindia.com.
How should i solve this problem so that my senders would be able to send their mail to proper user.
Pankaj
|