Sendmail forwarding

John Arthur lists at davey.net.au
Wed Jun 2 15:07:45 CST 2004


http://www.sendmail.org/faq/section3.html#3.39

The port used for outgoing SMTP connections can be changed via the
respective *_MAILER_ARGS macros for the various SMTP mailers. In a default
configuration, sendmail uses either the relay mailer (for e.g. SMART_HOST
when no mailer is specified) or the esmtp mailer (when sending directly to
the MX of the recipient domain).

So, if you want all outgoing SMTP connections to use port 2525, you can use
this in your .mc file:

	define(`RELAY_MAILER_ARGS', `TCP $h 2525')
	define(`ESMTP_MAILER_ARGS', `TCP $h 2525')

If you want to use an alternate port only for specific destinations, change
(e.g.) only the RELAY_MAILER_ARGS, and make sure the relay mailer is not
used for anything else. E.g. you can have sendmail use port 2525 only when
sending to your domain with this in your .mc file:
	FEATURE(`mailertable')
	define(`confRELAY_MAILER', `esmtp')
	define(`RELAY_MAILER_ARGS', `TCP $h 2525')

and then in your mailertable:
	yourdomain.com		relay:mail.yourdomain.com

This will force sendmail to use port 2525 for connections to yourdomain.com.
Of course, change 2525 to whatever alternate port number you wish to use.




> -----Original Message-----
> From: linuxsa-bounces at linuxsa.org.au
> [mailto:linuxsa-bounces at linuxsa.org.au]On Behalf Of Jeremy
> Sent: Wednesday, 2 June 2004 11:06 PM
> To: linuxsa at linuxsa.org.au
> Subject: Sendmail forwarding
>
>
> Hi,
>
> Does anybody know if it is possible for sendmail (or qmail) to forward
> mail to another SMTP host running on an alternative TCP port, but only
> for one domain, not for all the domains hosted on the server.
>
> Thanks,
> Jeremy
>
>
> --
> LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.freenode.net
> To unsubscribe or change your options:
>   http://www.netcraft.com.au/mailman/listinfo/linuxsa
>



More information about the linuxsa mailing list