man procmailrc
Нашел там такую фразу If the regular expression contains `^TO_' it will be substituted by
`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope
|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)', which should catch
all destination specifications containing a specific address.
If the regular expression contains `^TO' it will be substituted by
`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope
|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which should catch all
destination specifications containing a specific word.
Конструкт
* ^TO_vladimir@domain.ru
! vladimir
Работает замечательно. Но проблема осталась с полем СС или несколькими адресами в поле ТО
Конфиг
:0 c
* ^TO_sveta@domain.ru
! sveta
:0 c
* ^TO_vladimir@domain.ru
! vladimir
Происходит следующее, если верить логу
procmail: [4698] Tue Nov 25 16:47:56 2008
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)sveta@domain.ru"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi sveta"
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)vladimir@domain.ru"
procmail: Executing "/usr/sbin/sendmail,-oi,sveta"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi vladimir"
procmail: Bypassed locking "/var/mail/test.lock"
procmail: Assigning "LASTFOLDER=/var/mail/test"
procmail: Opening "/var/mail/test"
procmail: Acquiring kernel-lock
procmail: Executing "/usr/sbin/sendmail,-oi,vladimir"
procmail: Notified comsat: "test@1371927:/var/mail/test"
From xxxxxx@mail.ru Tue Nov 25 16:47:56 2008
Subject: =?windows-1251?Q?=F2=E5=F1=F2?=
Folder: /var/mail/test 1946
procmail: [4707] Tue Nov 25 16:47:57 2008
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)sveta@domain.ru"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi sveta"
procmail: Executing "/usr/sbin/sendmail,-oi,sveta"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi vladimir"
procmail: Bypassed locking "/var/mail/test.lock"
procmail: Assigning "LASTFOLDER=/var/mail/test"
procmail: Opening "/var/mail/test"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "test@1373873:/var/mail/test"
From xxxxxx@mail.ru Tue Nov 25 16:47:57 2008
Subject: =?windows-1251?Q?=F2=E5=F1=F2?=
Folder: /var/mail/test 1943
procmail: Executing "/usr/sbin/sendmail,-oi,vladimir"
Иначе говоря, прок запускается ДВА раза, и посылает дубль письма обоим пользователям..
Если 0: c не писать - доходит до первого, отправляет и успокаивается за сим (
Да, присланное ему письмо имело вид
To: =?windows-1251?Q?=C2=EB=E0=E4=E8=EC=E8=F0_=C8=EB=FC=E8=F7_=D3=EB=FF=ED=EE?=
=?windows-1251?Q?=E2?= <vladimir@domain.ru>
CC: sveta@domain.ru