This is a discussion on (newbie) Imap(Cyrus)+postfix work, but procmail doesent within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; Hello Mailers, i tried a few weeks, but it wont work together. I run suse 8.2 with Postfix and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello Mailers,
i tried a few weeks, but it wont work together. I run suse 8.2 with Postfix and imap (cyrus). This works fine, sending and receiving mail are working. But i dont know, how to insert the procmail filter. I get errors in many cases. in the future I will use procmail and spamassisin, but for now, procmail ist my wish. PLEASE, PLEASE HELP, in my inbox i have every day about 250 mails (50% spam)...... p.s. sorry for my bad english, its long time ago for me - you can answer me in german to bforpc@yahoo.de here are my configuration files: (main.cf, master.cf, procmailrc, imapd.conf, cyrus.conf) main.cf (there are some other sections in this file, but i think that this is not important) ------------------------- snip ------------------------- readme_directory = /usr/share/doc/packages/postfix/README_FILES mail_spool_directory = /var/mail canonical_maps = hash:/etc/postfix/canonical virtual_maps = hash:/etc/postfix/virtual relocated_maps = hash:/etc/postfix/relocated transport_maps = hash:/etc/postfix/transport sender_canonical_maps = hash:/etc/postfix/sender_canonical masquerade_exceptions = root masquerade_classes = envelope_sender, header_sender, header_recipient myhostname = brain.repcom.de program_directory = /usr/lib/postfix inet_interfaces = all masquerade_domains = mydestination = brain.repcom.de,repcom.dnsalias.net,repcom.de,mail .repcom.de,refas.de,wadiro.de,novak-online.de,digros.de,handceran.de,handceramic.de defer_transports = disable_dns_lookups = no relayhost = content_filter = mailbox_command = /usr/bin/procmail -a "$EXTENSION" mailbox_transport = lmtp:unix:public/lmtp #mailbox_transport = cyrus smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = strict_rfc821_envelopes = no smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtp_sasl_auth_enable = no smtpd_sasl_auth_enable = no smtpd_use_tls = no alias_maps = hash:/etc/aliases mailbox_size_limit = 51200000 message_size_limit = 10240000 ------------------------- snip ------------------------- master.cf ------------------------- snip ------------------------- smtp inet n - n - - smtpd -o content_filter=procmail:filter smtp inet n - n - - smtpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - n - - smtp relay unix - - n - - smtp showq unix n - n - - showq error unix - - n - - error local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} cyrus unix - n n - - pipe flags=R user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -m ${extension} ${user} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient vscan unix - n n - 10 pipe user=vscan argv=/usr/sbin/amavis ${sender} ${recipient} procmail unix - n n - - pipe flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user} SENDER=${sender} EXT=${extension} SENDER=${sender} /etc/procmailrc ------------------------- snip ------------------------- /etc/procmailrc ------------------------- snip ------------------------- LOGFILE=/tmp/procmail.log VERBOSE=yes #MAILBOX="" # 22.7.03, vorher auskommentiert #DEFAULT=|/usr/lib/cyrus/bin/deliver -e "$1" DELIVERYMAIL="/usr/lib/cyrus/bin/deliver" SENDER=$1 ------------------------- snip ------------------------- /etc/imapd.conf ------------------------- snip ------------------------- configdirectory: /var/lib/imap partition-default: /var/spool/imap sievedir: /var/lib/sieve admins: cyrus root allowanonymouslogin: no autocreatequota: 10000 reject8bit: no quotawarn: 90 timeout: 30 poptimeout: 10 dracinterval: 0 drachost: localhost sasl_pwcheck_method: saslauthd lmtp_overquota_perm_failure: no ------------------------- snip ------------------------- /etc/cyrus.conf ------------------------- snip ------------------------- START { # do not delete this entry! recover cmd="ctl_cyrusdb -r" # this is only necessary if using idled for IMAP IDLE # idled cmd="idled" } # UNIX sockets start with a slash and are put into /var/lib/imap/socket SERVICES { # add or remove based on preferences imap cmd="imapd" listen="imap" prefork=0 # imaps cmd="imapd -s" listen="imaps" prefork=0 pop3 cmd="pop3d" listen="pop3" prefork=0 # pop3s cmd="pop3d -s" listen="pop3s" prefork=0 sieve cmd="timsieved" listen="sieve" prefork=0 # at least one LMTP is required for delivery # lmtp cmd="lmtpd" listen="lmtp" prefork=0 lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1 ### lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1 # this is only necessary if using notifications # notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1 } EVENTS { # this is required checkpoint cmd="ctl_cyrusdb -c" period=30 # this is only necessary if using duplicate delivery suppression delprune cmd="ctl_deliver -E 3" period=1440 # this is only necessary if caching TLS sessions tlsprune cmd="tls_prune" period=1440 # Uncomment the next entry, if you want to automatically remove # old messages of EVERY user. # This example calls ipurge every 60 minutes and ipurge will delete # ALL messages older then 30 days. # enter 'man 8 ipurge' for more details # cleanup cmd="ipurge -d 30 -f" period=60 } ------------------------- snip ------------------------- |
|
|||
|
Hello Sven,
Sven Kavon schrieb: > /etc/procmailrc > ------------------------- snip ------------------------- > LOGFILE=/tmp/procmail.log > VERBOSE=yes > #MAILBOX="" > # 22.7.03, vorher auskommentiert > #DEFAULT=|/usr/lib/cyrus/bin/deliver -e "$1" > DELIVERYMAIL="/usr/lib/cyrus/bin/deliver" > SENDER=$1 :0 * ^From:.*@(yellow.com|spamworld.de|austria3.at) /dev/null :0 w *^TO.*bforpc@spamgourmet\.com | $DELIVERMAIL -e -a bforpc -m user.bforpc http://www2.uibk.ac.at/zid/systeme/m...ail/index.html Björn |
|
|||
|
On Fri, 01 Aug 2003 06:17:44 +0200, Bjoern Thomsen <bjoern@miareto.de>
wrote: >Hello Sven, > >Sven Kavon schrieb: > >> /etc/procmailrc >> ------------------------- snip ------------------------- >> LOGFILE=/tmp/procmail.log >> VERBOSE=yes >> #MAILBOX="" >> # 22.7.03, vorher auskommentiert >> #DEFAULT=|/usr/lib/cyrus/bin/deliver -e "$1" >> DELIVERYMAIL="/usr/lib/cyrus/bin/deliver" >> SENDER=$1 > >:0 >* ^From:.*@(yellow.com|spamworld.de|austria3.at) >/dev/null > >:0 w >*^TO.*bforpc@spamgourmet\.com >| $DELIVERMAIL -e -a bforpc -m user.bforpc > > >http://www2.uibk.ac.at/zid/systeme/m...ail/index.html > hilft mir nicht wirklich weiter, da ich kein "dmail" benutze. Ich nutze Postfix/cyrus (cyrus "deliver") sven |
|
|||
|
Sven Kavon wrote:
> Hello Mailers, > > i tried a few weeks, but it wont work together. > I run suse 8.2 with Postfix and imap (cyrus). > This works fine, sending and receiving mail are working. > > But i dont know, how to insert the procmail filter. I get errors in > many cases. in the future I will use procmail and spamassisin, but for > now, procmail ist my wish. > > PLEASE, PLEASE HELP, in my inbox i have every day about 250 mails (50% > spam)...... > > p.s. sorry for my bad english, its long time ago for me - you can > answer me in german to bforpc@yahoo.de > > > here are my configuration files: > (main.cf, master.cf, procmailrc, imapd.conf, cyrus.conf) > > main.cf > (there are some other sections in this file, but i think that this is > not important) > ------------------------- snip ------------------------- > readme_directory = /usr/share/doc/packages/postfix/README_FILES > mail_spool_directory = /var/mail > canonical_maps = hash:/etc/postfix/canonical > virtual_maps = hash:/etc/postfix/virtual > relocated_maps = hash:/etc/postfix/relocated > transport_maps = hash:/etc/postfix/transport > sender_canonical_maps = hash:/etc/postfix/sender_canonical > masquerade_exceptions = root > masquerade_classes = envelope_sender, header_sender, header_recipient > myhostname = brain.repcom.de > program_directory = /usr/lib/postfix > inet_interfaces = all > masquerade_domains = > mydestination = > brain.repcom.de,repcom.dnsalias.net,repcom.de,mail .repcom.de,refas.de,wadiro.de,novak-online.de,digros.de,handceran.de,handceramic.de > defer_transports = > disable_dns_lookups = no > relayhost = > content_filter = > mailbox_command = /usr/bin/procmail -a "$EXTENSION" > mailbox_transport = lmtp:unix:public/lmtp > #mailbox_transport = cyrus > smtpd_sender_restrictions = hash:/etc/postfix/access > smtpd_client_restrictions = > smtpd_helo_required = no > smtpd_helo_restrictions = > strict_rfc821_envelopes = no > smtpd_recipient_restrictions = > permit_mynetworks,reject_unauth_destination > smtp_sasl_auth_enable = no > smtpd_sasl_auth_enable = no > smtpd_use_tls = no > alias_maps = hash:/etc/aliases > mailbox_size_limit = 51200000 > message_size_limit = 10240000 > ------------------------- snip ------------------------- > > > > master.cf > ------------------------- snip ------------------------- > smtp inet n - n - - smtpd -o > content_filter=procmail:filter > smtp inet n - n - - smtpd > pickup fifo n - n 60 1 pickup > cleanup unix n - n - 0 cleanup > qmgr fifo n - n 300 1 qmgr > rewrite unix - - n - - > trivial-rewrite > bounce unix - - n - 0 bounce > defer unix - - n - 0 bounce > flush unix n - n 1000? 0 flush > proxymap unix - - n - - proxymap > smtp unix - - n - - smtp > relay unix - - n - - smtp > showq unix n - n - - showq > error unix - - n - - error > local unix - n n - - local > virtual unix - n n - - virtual > lmtp unix - - n - - lmtp > maildrop unix - n n - - pipe > flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} > cyrus unix - n n - - pipe > flags=R user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -m > ${extension} ${user} > uucp unix - n n - - pipe > flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail > ($recipient) > ifmail unix - n n - - pipe > flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop > ($recipient) > bsmtp unix - n n - - pipe > flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop > $recipient > vscan unix - n n - 10 pipe > user=vscan argv=/usr/sbin/amavis ${sender} ${recipient} > procmail unix - n n - - pipe > flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user} > SENDER=${sender} EXT=${extension} SENDER=${sender} /etc/procmailrc > ------------------------- snip ------------------------- > > > /etc/procmailrc > ------------------------- snip ------------------------- > LOGFILE=/tmp/procmail.log > VERBOSE=yes > #MAILBOX="" > # 22.7.03, vorher auskommentiert > #DEFAULT=|/usr/lib/cyrus/bin/deliver -e "$1" > DELIVERYMAIL="/usr/lib/cyrus/bin/deliver" > SENDER=$1 > ------------------------- snip ------------------------- > > > /etc/imapd.conf > ------------------------- snip ------------------------- > configdirectory: /var/lib/imap > partition-default: /var/spool/imap > sievedir: /var/lib/sieve > admins: cyrus root > allowanonymouslogin: no > autocreatequota: 10000 > reject8bit: no > quotawarn: 90 > timeout: 30 > poptimeout: 10 > dracinterval: 0 > drachost: localhost > sasl_pwcheck_method: saslauthd > lmtp_overquota_perm_failure: no > ------------------------- snip ------------------------- > > > /etc/cyrus.conf > ------------------------- snip ------------------------- > START { > # do not delete this entry! > recover cmd="ctl_cyrusdb -r" > > # this is only necessary if using idled for IMAP IDLE > # idled cmd="idled" > } > > # UNIX sockets start with a slash and are put into > /var/lib/imap/socket > SERVICES { > # add or remove based on preferences > imap cmd="imapd" listen="imap" prefork=0 > # imaps cmd="imapd -s" listen="imaps" prefork=0 > pop3 cmd="pop3d" listen="pop3" prefork=0 > # pop3s cmd="pop3d -s" listen="pop3s" prefork=0 > sieve cmd="timsieved" listen="sieve" prefork=0 > > # at least one LMTP is required for delivery > # lmtp cmd="lmtpd" listen="lmtp" prefork=0 > lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" > prefork=1 > ### lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" > prefork=1 > > # this is only necessary if using notifications > # notify cmd="notifyd" listen="/var/lib/imap/socket/notify" > proto="udp" prefork=1 > } > > EVENTS { > # this is required > checkpoint cmd="ctl_cyrusdb -c" period=30 > > # this is only necessary if using duplicate delivery suppression > delprune cmd="ctl_deliver -E 3" period=1440 > > # this is only necessary if caching TLS sessions > tlsprune cmd="tls_prune" period=1440 > > # Uncomment the next entry, if you want to automatically remove > # old messages of EVERY user. > # This example calls ipurge every 60 minutes and ipurge will delete > # ALL messages older then 30 days. > # enter 'man 8 ipurge' for more details > > # cleanup cmd="ipurge -d 30 -f" period=60 > } > ------------------------- snip ------------------------- I did see this line in yourmain.cf: mailbox_command = /usr/bin/procmail -Y -a $DOMAIN I don't know if needed but my procmailrc has a "." =hidden file I know that the permissions are kind of important. I they are too loose, it won't work. Mine are -rw---- Here is my relevant .provmailrc # Please check if all the paths in PATH are reachable, remove the ones that # are not. PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:. MAILDIR=$HOME/Mail # You'd better make sure it exists DEFAULT=$MAILDIR/mbox LOGFILE=$MAILDIR/from LOCKFILE=$HOME/.lockmail :0fw | spamassassin -P :0 # Anything from thf If you are using imap, you need to commnet out the DEFAULT=$MAIL... line Tom |