[olug] *sending* e-mail on a non-SMTP port?
Phil Brutsche
phil at brutsche.us
Mon Apr 4 23:52:06 UTC 2005
Daniel Linder wrote:
> Is there a way to setup Postfix to use my external box as a "smart relay",
> but it has to use a port other than port 25 to do this. Anyone have any
> hints or FAQ links?
If you do use your datacenter host as a smarthost the standardized port
number is 587... and make sure you have secure authentication (ie
CRAM-MD5, DIGEST-MD5, plain text over ssl, whatever) setup.
I *believe* this will work in main.cf to setup a smarthost on port 587:
relayhost = [hostname or ip of remote server]:587
But you should double check that, as I'm an Exim user rather than a
Postfix user.
An alternative would be to create a wrapper script, similar to the one
already posted. I've used this, saved as /usr/local/bin/ssh-sendmail:
#!/bin/bash
ssh user at host /usr/sbin/sendmail $@
You would need to make sure the appropriate SSH keys are already set up,
and replace /usr/sbin/sendmail with whatever program your MTA uses that
accepts Sendmail-compatible command-line parameters.
Simply substitute /usr/sbin/sendmail for /usr/local/bin/ssh-sendmail in
your app - it just works with pine, for example.
--
Phil Brutsche
phil at brutsche.us
More information about the OLUG
mailing list