0

hi frndz...
i m new to linux i need to config sendmail MTA and i hav to use procmail as filter and cyrus as LDA... plz help me guys ...
i need a sendmail config file for the above mentioned options ....

1
Contributor
1
Reply
4
Views
6 Years
Discussion Span
Last Post by kartisathis
0

hi guys i found a solution for that i think it will be helpfull to others by posting this ...


Edit /etc/sendmail.cf and look for the section that defines the Cyrus mailer. It will look something like the lines below. If you've customized your sendmail configuration, it might look slightly different, but will begin with the identifier "Mcyrus".

Mcyrus, P=/usr/cyrus/bin/deliver, F=lsDFMnPqA5@, S=10, R=20/40, T=X-Unix,
U=cyrus:mail,
A=deliver -e -m $h -- $u
Comment out that section and add the following lines below it:

Mcyrus, P=/usr/bin/procmail, F=lsDFMnPqA5@, S=10, R=20/40, T=X-Unix,
U=cyrus:mail,
A=procmail -p /var/imap/procmail/procmail.global CYRUSUSER=$u
The -p argument tells procmail to preserve the existing environment.The last parameter, /var/imap/procmail/procmail.global, tells procmail to use /var/imap/procmail/procmail.global to determine its filtering behavior. The last parameter, CYRUSUSER, sets the CYRUSUSER variable to username and passes the variable to procmail. CYRUSUSER is used in the procmail rules files

A Global procmail Rules File:
*********************************

# File: procmail.global

PATH=/usr/bin:/usr/local/bin:/usr/cyrus/bin
SHELL=/bin/sh
DELIVER=/usr/cyrus/bin/deliver
SPAM=/dev/null

# Make a backup copy of all incoming mail (comment the next entry
# out once you're finished testing procmail integration)
#:0 ic
#| $DELIVER -e -a $CYRUSUSER -m user.$CYRUSUSER.backup

# Execute CYRUSUSER's personal rules
INCLUDERC=/var/imap/procmail/user/procmail.$CYRUSUSER

[The user's procmail rules are included (via the INCLUDERC statement above)
and executed here. Rules after this point resume after the user's personal
rules have been executed.]

# Example recipes

# If the "To:" line doesn't exist, it's SPAM
:0:$CYRUSUSER.lock
* !^To:
| $SPAM

# Get rid of SPAM from a specific email address
:0:$CYRUSUSER.lock
* ^To:.*makemoneyfast@aol.com
| $SPAM

# All the mail that falls through to this point
# will be delivered into the user's INBOX
:0:$CYRUSUSER.lock
| $DELIVER -e -a $CYRUSUSER -m user.$CYRUSUSER
Personal procmail rules file

Each user has a personal procmail rules file. It's stored under /var/imap/procmail/user/ in the file procmail.username. The personal rules file is the file each user edits when he wants to change his filtering rules. If the file exists, the INCLUDERC statement in the global procmail rules file runs the rules in the personal file.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.