Difference between revisions of "sendmail/procmail"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(more links)
(clarification of link)
Line 15: Line 15:
 
</pre>
 
</pre>
  
This would arrange for (anything)@host.com to be sent
+
This would arrange for (anything)@host.com to be sent to person@other.host.  Within the procmail script, $1 is the name of the sender and $2 is the name of the recipient.
to person@other.host.  Within the procmail script, $1 is
 
the name of the sender and $2 is the name of the recipient.
 
  
If you use this with FEATURE(`[http://www.sendmail.com/sm/open_source/docs/m4/features.html#local_procmail local_procmail]'),  
+
If you use this with FEATURE(`[http://www.sendmail.com/sm/open_source/docs/m4/features.html#local_procmail local_procmail]'), the [http://www.sendmail.com/sm/open_source/docs/m4/features.html FEATURE] should be listed first.
the [http://www.sendmail.com/sm/open_source/docs/m4/features.html FEATURE]
 
should be listed first.
 
  
Of course there are other ways to solve this particular
+
Of course there are other ways to solve this particular problem, e.g., a catch-all entry in a [http://www.sendmail.com/sm/open_source/docs/m4/features.html#virtusertable virtusertable].
problem, e.g., a catch-all entry in a [http://www.sendmail.com/sm/open_source/docs/m4/features.html#virtusertable virtusertable].
 
 
</blockquote>
 
</blockquote>
 
==Links==
 
==Links==
* [http://softpanorama.net/Mail/procmail.shtml Invoking procmail from sendmail]
+
* [http://softpanorama.net/Mail/procmail.shtml Invoking procmail from sendmail]: this seems to be about how to forward mail to procmail on a shared server, rather than how to configure sendmail to filter ''all'' mail through procmail
 
* [http://www.sendmail.com/sm/open_source/docs/m4/ostype.html#PROCMAIL_MAILER_PATH PROCMAIL_MAILER_PATH] parameter
 
* [http://www.sendmail.com/sm/open_source/docs/m4/ostype.html#PROCMAIL_MAILER_PATH PROCMAIL_MAILER_PATH] parameter
 
** [http://www.sendmail.com/sm/open_source/docs/m4/intro.html MAILER] parameter
 
** [http://www.sendmail.com/sm/open_source/docs/m4/intro.html MAILER] parameter
 
** [http://www.sendmail.com/sm/open_source/docs/m4/features.html features]: see "local_procmail" parameter
 
** [http://www.sendmail.com/sm/open_source/docs/m4/features.html features]: see "local_procmail" parameter
 
* [http://www.sendmail.com/sm/open_source/support/support_faq/faq_ver_8_issues/ FAQ: Version 8 issues] seems to have some procmail examples
 
* [http://www.sendmail.com/sm/open_source/support/support_faq/faq_ver_8_issues/ FAQ: Version 8 issues] seems to have some procmail examples

Revision as of 22:34, 28 May 2013

Notes

From the mailers documentation:

This is designed to be used in mailertables. For example, a common question is "how do I forward all mail for a given domain to a single person?". If you have this mailer defined, you could set up a mailertable reading:

host.com	procmail:/etc/procmailrcs/host.com

with the file /etc/procmailrcs/host.com reading:

:0	# forward mail for host.com
! -oi -f $1 person@other.host

This would arrange for (anything)@host.com to be sent to person@other.host. Within the procmail script, $1 is the name of the sender and $2 is the name of the recipient.

If you use this with FEATURE(`local_procmail'), the FEATURE should be listed first.

Of course there are other ways to solve this particular problem, e.g., a catch-all entry in a virtusertable.

Links