Re: Sendmail relay and procmail



In article <1173366491.829842.260520@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
turtle@xxxxxxxxxxxxx writes:

I am trying to make a setup where my sendmail is a relaying host where
all mails i piped to procmail on the way to the recipent.

I have tried some examples i found on the net, and they all fail.

Im on openbsd4.1beta running sendmail 8.14.0

It starts out great, i add the hosts to be relayed, and everything is
working. Now its time for procmail. When i add the rules that invoke
procmail i starts giving my this error in the maillog: SYSERR(root):
savemail: cannot save rejected email anywhere.

And yes. There is alot of space, and i set the permissions for /tmp, /
var/mail, /var/spool/mqeue to 777 for root.

You certainly don't want to set those to 777 - but ayway this is a
"logical" error, not "physical". Sendmail tries to send the message and
it fails, then it tries to send a bounce and it fails too, then it tries
to send a double-bounce to Postmaster and that fails too. If this was a
direct submission by a user, it could have saved the message in
$HOME/dead.letter, but it isn't so that fails too - at which point
sendmail gives this slightly confusing message - it actually *has* saved
the message in the queue directory, with the queue file named Qfxxxx
rather than qfxxxx, to prevent subsequent processing attempts.

I would love if someone
knew what is wrong.

this is what i followed.:
http://www.xray.mpe.mpg.de/mailing-lists/procmail/2000-05/msg00042.html
http://www.professional.org/procmail/mailer.html
http://www.impsec.org/email-tools/procmail-on-gateway.txt

Well, I'm sorry, but my advice is "give up". Your problem above is with
the basic logic of your rules and can certainly be fixed, but even when
it appears to actually work there are lots of broken corner-cases with
these methods. This spoken as someone who actually tried to provide such
a set of rules (posted here in several versions way back), and ought to
have been able to get it right, but it was simply too much effort - the
basic "process it once and mangle the address so you don't try to
process it again when it comes back" method is really a hack in the
worst sense: Something you shouldn't have done in the first place, and
you fix it and patch it and try to beat it into shape, but it never
becomes really correct...

These days you use a milter if you want to insert your own custom
processing in the mail flow - there are many of those around, and you
may well find one that already does what you want, or provides hooks
that let you implement it - e.g. with MIMEDefang you can do anything
that you can do in perl. You might even be able to figure out a way to
invoke procmail from it without any need for hacks in the sendmail
config...

--Per Hedeland
per@xxxxxxxxxxxx
.



Relevant Pages

  • Re: Sendmail relay and procmail
    ... all mails i piped to procmail on the way to the recipent. ... Now its time for procmail. ... When i add the rules that invoke ... it fails, then it tries to send a bounce and it fails too, then it tries ...
    (comp.mail.sendmail)
  • Re: Problem with Skunkware procmail 3.1.5 & 5.0.7 MP5
    ... for programs you want to allow sendmail to run. ... It appears to be in configured format followed by the old format. ... And I still need suggestions on how to prevent procmail from hosing my ... the next thing to do is get Spamassassin 3.1.4 to work. ...
    (comp.unix.sco.misc)
  • Re: need help about sendmail
    ... Copying all mail to Archive *The following is probably made obsolete by ... sendmail to archive copies of outgoing mail". ... The Sendmail FAQ does offer three suggestions for doing this, ... In the FAQ, and in the newsgroup, it is also suggested that Procmail can ...
    (RedHat)
  • Re: need help about sendmail
    ... One of the most common questions on comp.mail.sendmail is "How do I get ... sendmail to archive copies of outgoing mail". ... In the FAQ, and in the newsgroup, it is also suggested that Procmail can do ...
    (RedHat)
  • Re: Sendmail, Procmail and (ugh) Exchange
    ... Due to the crappy filtering available in Exchange, I want to still use procmail. ... We also still want to use sendmail for handling some other issues ... First remember that Procmail is a "Local Delivery Agent" that Sendmail calls for local delivery. ...
    (comp.mail.sendmail)