Postfix address delimeters with cyrus
Hi, I am probably not seeing the obvious ( a repeating problem for a week or so for other things as well) I have installed a mailserver box SuSE 9.0 with Postfix and Cyrus-imapd As per the Readme file in /usr/share/doc/packages/cyrus-imapd cyrus-imapd and postfix together -------------------------------- To use cyrus-imapd 2.0.x with postfix you may try the following: edit /etc/postfix/main.cf and add the following line: mailbox_transport = lmtp:unix:public/lmtp edit /etc/cyrus.conf and add the following line: lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1 I have added the following to /etc/sysconfig/postfix POSTFIX_ADD_MAILBOX_TRANSPORT=lmtp:unix:public/lmtp ## Type: list(procmail,cyrus,local) ## Default: local ## Config: postfix # # POSTFIX_MDA possible values: # procmail: use procmail to deliver mail locally # cyrus : use lmtp to deliver to cyrus-imapd # local : use postfix local MDA # POSTFIX_MDA=cyrus This causes the following error when SuSeconfig runs Setting up cyrus-imapd via lmtp as MDA... *** WARNING *** the socket to listen on is wrong in /etc/cyrus.conf use listen="/var/lib/imap/socket/lmtp" instead! *** WARNING *** and here is the /etc/cyrus.conf # at least one LMTP is required for delivery # lmtp cmd="lmtpd" listen="lmtp" prefork=0 # commented out per readme # lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=0 #as per readme lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1 when I change the POSTFIX_MDA back to local no errors are produced by SuSEconfig. So the questions what am I not seeing here ? However then I have another problem since I have implemented the following POSTFIX_ADD_RECIPIENT_DELIMITER="-" email that comes as username-ANYTHING@mydomain is not delivered to the mailbox as cyrus now complains there is no such user as username-ANYTHING I should not have to define aliases or virtual_users or canonical maps for this -ANYTHING part AS the postfix documentation says The separator between user names and address extensions (user+foo). See canonical(5), local(8), relocated(5) and virtual(5) for the effects this has on aliases, canonical, virtual, relocated and on .forward file lookups. Basically, the software tries user+foo and .forward+foo before trying user and .forward. and the second question is how do I get the delimeter working ? Thanks -- Togan Muftuoglu | Unofficial SuSE FAQ Maintainer | Please reply to the list; http://susefaq.sf.net | Please don't put me in TO/CC. Nisi defectum, haud refiecendum
Togan Muftuoglu said:
Hi,
I am probably not seeing the obvious ( a repeating problem for a week or so for other things as well)
I have installed a mailserver box SuSE 9.0 with Postfix and Cyrus-imapd
As per the Readme file in /usr/share/doc/packages/cyrus-imapd
cyrus-imapd and postfix together --------------------------------
To use cyrus-imapd 2.0.x with postfix you may try the following:
edit /etc/postfix/main.cf and add the following line:
mailbox_transport = lmtp:unix:public/lmtp
edit /etc/cyrus.conf and add the following line:
lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1
I have added the following to /etc/sysconfig/postfix
POSTFIX_ADD_MAILBOX_TRANSPORT=lmtp:unix:public/lmtp
## Type: list(procmail,cyrus,local) ## Default: local ## Config: postfix # # POSTFIX_MDA possible values: # procmail: use procmail to deliver mail locally # cyrus : use lmtp to deliver to cyrus-imapd # local : use postfix local MDA # POSTFIX_MDA=cyrus
Are you also running postfix chroot? POSTFIX_CHROOT="yes"
This causes the following error when SuSeconfig runs
Setting up cyrus-imapd via lmtp as MDA... *** WARNING *** the socket to listen on is wrong in /etc/cyrus.conf use listen="/var/lib/imap/socket/lmtp" instead! *** WARNING ***
and here is the /etc/cyrus.conf
# at least one LMTP is required for delivery # lmtp cmd="lmtpd" listen="lmtp" prefork=0 # commented out per readme # lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=0 #as per readme lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1
There's your problem, edit /etc/cyrus.conf like this # lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=0 lmtpunix cmd="lmtpd -a localhost" listen="/var/spool/postfix/public/lmtp" prefork=1
when I change the POSTFIX_MDA back to local no errors are produced by SuSEconfig.
So the questions what am I not seeing here ?
You're not reading the docs on cyrus. Cyrus is opening the socket in /var/lib/imap/socket/lmtp and Postfix is looking in /var/spool/postfix/public/lmtp for the socket.
However then I have another problem since I have implemented the following
POSTFIX_ADD_RECIPIENT_DELIMITER="-"
email that comes as username-ANYTHING@mydomain is not delivered to the mailbox as cyrus now complains there is no such user as username-ANYTHING
Have you defined username-ANYTHING in cyrus? Cyrus is doing the authentication and looking for mailboxes, so if it can't find the mailbox for username-ANYTHING it can't deliver.
I should not have to define aliases or virtual_users or canonical maps for this -ANYTHING part
AS the postfix documentation says
The separator between user names and address extensions (user+foo). See canonical(5), local(8), relocated(5) and virtual(5) for the effects this has on aliases, canonical, virtual, relocated and on .forward file lookups. Basically, the software tries user+foo and .forward+foo before trying user and .forward.
and the second question is how do I get the delimeter working ?
Can't answer that, haven't used it, but I suspect you're reading into it more than it's intended to do. I could be wrong. Solve the connection between Postfix and Cyrus first, then go to subscribe to the postfix list and ask there. If you're expecting it to work like qmail, then you are on the wrong track, it doesn't. -- Neil Schneider pacneil_at_linuxgeek_dot_net http://www.paccomp.com Key fingerprint = 67F0 E493 FCC0 0A8C 769B 8209 32D7 1DB1 8460 C47D Fires can't be made with dead embers, nor can enthusiasm be stirred by spiritless men. Enthusiasm in our daily work lightens effort and turns even labor into pleasant tasks. --James Baldwin
* Neil Schneider;
Togan Muftuoglu said: Are you also running postfix chroot? POSTFIX_CHROOT="yes"
Ofcourse, and Update chroot is also yes
There's your problem, edit /etc/cyrus.conf like this # lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=0 lmtpunix cmd="lmtpd -a localhost" listen="/var/spool/postfix/public/lmtp" prefork=1
why not place the following to /etc/imapd.conf lmtpsocket: /var/spool/postfix/public/lmtp
So the questions what am I not seeing here ?
You're not reading the docs on cyrus. Cyrus is opening the socket in /var/lib/imap/socket/lmtp and Postfix is looking in /var/spool/postfix/public/lmtp for the socket.
That I do understand. However this yields to the point question the README.SUSE is wrong
Have you defined username-ANYTHING in cyrus? Cyrus is doing the authentication and looking for mailboxes, so if it can't find the mailbox for username-ANYTHING it can't deliver.
No and I do not intend to do so. The main logic I have is I can define any combination like user1-SUSE and user1-BANKS yet at the end of the they they all need to go to the same box user1 At the end I have solved it with defining it in the virtual table, though I am not so sure if that is the correct place to do so
Can't answer that, haven't used it, but I suspect you're reading into it more than it's intended to do. I could be wrong. Solve the connection between Postfix and Cyrus first, then go to subscribe to the postfix list and ask there. If you're expecting it to work like qmail, then you are on the wrong track, it doesn't.
I have no idea how qmail works and I am not interested in learning. I m already subscribed to postfix, nevertheless thanks for the suggestion. Since the first part was related to SuSE documentation, I thought of asking here as probably I am not the first one to run cyrus along with postfix which is chrooted Anyway thanks at least you gave me a direction to look into -- Togan Muftuoglu | Unofficial SuSE FAQ Maintainer | Please reply to the list; http://susefaq.sf.net | Please don't put me in TO/CC. Nisi defectum, haud refiecendum
On Friday 23 April 2004 15.06, Togan Muftuoglu wrote:
However then I have another problem since I have implemented the following
POSTFIX_ADD_RECIPIENT_DELIMITER="-"
Did you try it without the quote marks? recipient_delimiter=- works well for me
participants (3)
-
Anders Johansson
-
Neil Schneider
-
Togan Muftuoglu