procmail
[Top] [All Lists]

Re: return to sender recipe

2010-12-16 10:31:17
Hi Sean,

Thanks again for your reply. When you say below that I can just add
$SENDMAIL="smmtp" in order to substitute ssmtp for sendmail, can I just add
that to the recipe itself?  I found a recipe that returns messages using
sendmail (grabbing the senders info from the message) and I was hoping to do
the following:

:0
$SENDMAIL="smmtp"
*^From:.*example.*accounting
|( formail -rI"From: Responses will be automatically discarded <
gatorreina(_at_)gmail(_dot_)com>"; \
   echo "Your mail has been rejected because it lacks a purchase order."; \
   echo "Please resubmit with a valid purchase order number." \
 ) | $SENDMAIL -oi -t

Do you know if this will work?



2010/12/11 Professional Software Engineering 
<PSE-L(_at_)mail(_dot_)professional(_dot_)org>

At 06:28 2010-12-11, Richard Reina wrote:

I am trying to find a recipe that would allow me to return a message to
the sender using ssmtp or msmtp -- I do not want to use sendmail.  Does
anyone know where I might find such a recipe?


Just pipe the message you're sending into ssmtp with the appropriate
commandline.  If you want to supplant sendmail entirely (versus for "a
message"), then:

$SENDMAIL="smmtp"
$SENDMAILOPTS="whatever options are necessary"

Normally, you'd use this just for FORWARDING:

:0
! address

But you can invoke it directly:

:0
| $SENDMAIL $SENDMAILOPTS address

(in which case you can change or amend options on that invocation).

When you say "return a message", are you trying to produce a bounce, or
send some other message text back to the sender?

There are examples of sending autoreplies in 'man procmailex'.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <
http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>