procmail
[Top] [All Lists]

Re: Use different smtp server with procmail

2010-11-24 04:18:58
On 23/11/10 13.33, Raffaele wrote:
On 22/11/10 18.35, Professional Software Engineering wrote:
At 09:04 2010-11-22, Raffaele wrote:
different host, but I do not want procmail to use the sendmail
configuration of the system where is my account (*).
I just need to say procmail to use a different smtp server. Do you
know any way to do that?

You'd need to have a helper app that speaks SMTP, then change the
$SENDMAIL and $SENDMAILFLAGS definitions to point to that. If you use
certain external tools which themselves might generate an email, all
bets are off.

There are a number of tools which can relay messages to a remote server
- some (such as ssmtp) presume to be a daemon running on the local host,
which may not work very well for you, though you could probably
recompile with new config-file paths, etc - but it'd likely require a
bit of work. There's the Perl Net::SMTP module, which would allow you to
draft something up to act as a submission relay. smtpsend
<http://freshmeat.net/projects/smtpsend/> is based on Net::SMTP, and is
probably the most consise tool for what you want to accomplish.
Hi Sean,
thanks a lot for your answer and your suggestions. I'll try to use
sendmail app on the server using a different configuration file
(sendmail -C option) and see what happens.

Thanks again,
Raffaele

Hi all,
in the end I worked it out with this procmail command:

:0
| /usr/lib/sendmail -C mysendmail.cf 
other_account(_at_)different(_dot_)host(_dot_)it

otherwise this command could be used:

:0
! -C mysendmail.cf other_account(_at_)different(_dot_)host(_dot_)it

since ! is equal to | $SENDMAIL

I am really grateful to *Bart Schaefer* who wrote to me personally pointing out the right way and giving many suggestions.

Raffaele
____________________________________________________________
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>