At 08:31 2010-12-16, Richard Reina wrote:
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?
Well, you'd add that to the recipe, but my point was that if part of
your intent is to NOT invoke sendmail for anything you're doing, you
may as well ensure that the $SENDMAIL and $SENDMAILFLAGS variables
are defined to what you want to be using. You can always pipe your
message into smmtp directly as a pipelined delivery.
Other comments given re: not doing this to REJECT spam should be
heeded. If you can't reject the messages during SMTP time, you (and
all the people who are victims of Joe-jobbing and email forgery)
would be better off just trashing the messages.
:0
$SENDMAIL="smmtp"
*^From:.*example.*accounting
|( formail -rI"From: Responses will be automatically discarded
<<mailto:gatorreina(_at_)gmail(_dot_)com>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?
Is it 'smmtp' or 'ssmtp' you're intending to invoke? Typos can be a
real bugger.
I presume the condition line there is a random example, and you'd
ACTUALLY have something to check the message for a purchase
order? If the person resubmits with a valid purchase order, that
condition doesn't look like it's going to check. You're also not
checking for looping (see the 'man procmailex' for examples) - so
someone could get this to send mail to itself (though not infinitely)
by using a Reply-To: header to you if they were so inclined. People
who have misbehaving autoreplies - especially on discussion lists -
often get surprises like that.
In the specific invocation, there's no reason to redefine $SENDMAIL
just for that one pipe -- the final bit could be:
| ssmtp -oi -t
are -oi and -t valid parms to the program (if it's ssmtp, not smmtp,
then yes, these mimic sendmail parms), or are you just grabbing stuff
used by sendmail and changing the command name?
---
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