Hello List,
Searching in documentation, mailinglists etc I a could not find help for a
standard configuration, maybe somebody can help.
Our client has one single external mailbox that receives all mails for his
domain. (domain.com). The complete mail gets fetched by the user "fetchmail"
to our local mailserver to be redistributed to the local users and other
external mail accounts. Mails to unknown users should stay in the mailbox of
user "fetchmail"
So we configured /home/fetchmail/.fetchmailrc to redistribute to the local
mailboxes.
First we did this:
---------------------
TO=`formail -tzX-From:`
:0
* ^TOuser1(_at_)domain(_dot_)com
! user1
:0
* ^TOuser2(_at_)domain(_dot_)com
! somebody
:0
* ^TOuser3(_at_)domain(_dot_)com
! user3(_at_)domain2(_dot_)com
------------------------
So far it looked fine, but mails to user1, CC user2 would be delivered just to
the first coincedence, in this case user1.
We added a "c" in each receipt, to make procmail keep on processing after
delivery.
--------------------------
:0c
* ^TOuser1(_at_)domain(_dot_)com
! user1
----------------------------
To avoid user "fetchmail" receiving all mails already delivered to other users
we added a second rule for each user in the end of .procmailrc:
------------------------------
:0
* ^TOuser1(_at_)domain(_dot_)com
backup
--------------------------------
If the receipt finds a coincedence in the top it delivers the copy to the
users, after it stores the original mail in backup. If there is no
coincedence at all mail goes to the user "fetchmail".
So far this works fine but mails sent to mailinglists or BCC get dropped into
"fetchmail" mailbox, not to the user it is addressed to. I suspect the error
in "TO=`formail -tzX-From:`" man promailrc says:
"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." - But in our case procmail is not looking for Bcc.
Any help is appreciated.
Dirk Enrique Seiffert
--
CaribeNet S.A. - Cartagena - Colombia
www.caribenet.com
--
Este mensaje ha sido analizado en busca de virus
y otros contenidos peligrosos,
y se considera que está limpio.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail