Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two CentOS systems, version 5 and 6. Because our firewall has blocked off unsolicited port 25 traffic, we have a little Perl script that logs into our email server as a valid user to send email off our Linux systems. That works fine in CentOS.

I have an Ubuntu 12.04 workstation, which was recently updated, and I had lost the ability to send email off the system until I added this to /etc/mail/, taking it from one of the CentOS /etc/mail/ files.

Msmtpredir,          P=/usr/sbin/SMTPRedirect, F=DFMnSu,
                     A=SMTPRedirect $h $f $u

/usr/sbin/SMTPRedirect is a perl script that logs into our email system as a legitimate client without the need for password.

Can Msmtpredir be configured in

share|improve this question
up vote 1 down vote accepted

The short answer is YES you can and I think it is relatively easy. I've done a lot of tinkering with configuration files in the past.....But I'd have to dig into the documentation to tell you how. That would be a good place for you to start your research.

From the sendmail cf.README text file:

" +--------------------------------+ | ADDING NEW MAILERS OR RULESETS | +--------------------------------+

Sometimes you may need to add entirely new mailers or rulesets. They should be introduced with the constructs MAILER_DEFINITIONS and LOCAL_RULESETS respectively. For example:

    Mmymailer, ...


Local additions for the rulesets srv_features, try_tls, tls_rcpt, tls_client, and tls_server can be made using LOCAL_SRV_FEATURES, LOCAL_TRY_TLS, LOCAL_TLS_RCPT, LOCAL_TLS_CLIENT, and LOCAL_TLS_SERVER, respectively. For example, to add a local ruleset that decides whether to try STARTTLS in a sendmail client, use:


Note: you don't need to add a name for the ruleset, it is implicitly defined by using the appropriate macro.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.