Procmail: how to deliver email over an ssh-tunnel to my smtp
server.
Rob
spamrefuse at yahoo.com
Wed Apr 6 06:28:34 PDT 2005
Rob wrote:
> Hello,
>
> I'm having 4.11 and 5.3 FreeBSD PCs.
>
> All incoming email arrives through fetchmail (using
> imap protocol).
>
> I then filter all email with procmail, which is
> configured such that it
> trashes spam, or
> delivers to local mailbox, or
> forwards to another external address.
>
> For external delivery, I have set up an ssh tunnel
> to my smtp server:
>
> ssh -N -f -L 2525:localhost:25 smtp.server.it
>
> What do I have to do next, to have the delivery
> work properly?
>
> Can I tell procmail to push the email directly onto
> the port 2525 of the ssh tunnel?
>
> Or do I have to reconfigure sendmail for this?
> (sendmail reconfiguration info looks like a
> nightmare to me though....).
>
> Do I have other options?
I'll answer my own question here, just for the record.
Use msmtp, which is highly configurable, for example
defining its own outgoing port.
In the .procmailrc file I only need to add:
:0
| /usr/local/bin/msmtp email at address.com
to forward the email with msmtp, over my own ssh
tunnel port.
Works like a charm.
Rob.
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest
More information about the freebsd-questions
mailing list