LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2006, 07:26 PM   #1
swilliams2006
Member
 
Registered: Dec 2005
Location: Kent
Distribution: Kubuntu 6.10
Posts: 32

Rep: Reputation: 15
Postfix not forwarding to Cyrus


Hi,

I am in the process of migrating from Courier IMAP to Cyrus IMAP due to problems I have had with Courier that I was unable to solve.

I have got the bulk of the configuration done, and have tried sending myself test messages. These test messages never arrive. I am sending them to steve@localhost which always used to work.

I have used the guide at http://www.faqs.org/docs/Linux-HOWTO/Cyrus-IMAP.html with the following exceptions:
* I am running Mandriva 2006
* I used URPMI to get the packages rather than building from source (I can very rarely get source code to build due to my lack of experience!!!!)
* I am using PAM rather than SASL (this is because I can't get hold of saslpasswd)

Looking initially at the logs in /var/mail/info, it looks like it doesn't get through because cyrdeliver cannot be found. I cannot find anywhere on Google to get this. I have tried using the default settings for Cyrus by uncommenting them in master.cf and commenting the last line. This generates errors in /var/mail/info that it cannot resolve localhost.

Quote:
Originally Posted by main.cf
# These are only the parameters changed from a default install
# see /etc/postfix/main.cf.dist for a commented, fuller version of this file.

# These are changed by postfix install script
readme_directory = /usr/share/doc/postfix-2.2.5/README_FILES
html_directory = /usr/share/doc/postfix-2.2.5/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq

# User configurable parameters

myhostname = siege
mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost
mynetworks = 192.168.0.0/24, 127.0.0.0/8
#home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
alias_maps = hash:/etc/postfix/aliases
#mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
#mailq_path = /usr/bin/mailq.postfix
#setgid_group = postdrop
manpage_directory = /usr/share/man
debug_peer_level = 1
debugger_command = PATH=/usr/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 4
#inet_interfaces = localhost
mynetworks_style = host
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)
unknown_local_recipient_reject_code = 450
smtp-filter_destination_concurrency_limit = 2
lmtp-filter_destination_concurrency_limit = 2
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
local_transport = cyrus
Quote:
Originally Posted by master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# The script postfix-chroot.sh can be used to set up a Postfix chroot
# environment on your Mandrivalinux System.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - y 60 1 pickup
-o content_filter=
-o receive_override_options=
cleanup unix n - y - 0 cleanup
qmgr fifo n - y 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - y - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - y - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
#
# Cyrus. Please See the Postfix CYRUS_README file for details
#
# deliver interface (deprecated), to use this also use
# postconf -e cyrus-deliver_destination_recipient_limit=1
#cyrus-deliver unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# for default cyrus socket placement
cyrus unix - n n - - lmtp
-o lmtp_cache_connection=yes
#
# if you configure cyrus socket in the chroot jail
#cyrus-chroot unix - - y - - lmtp
-o lmtp_cache_connection=yes
#
# for lmtp to cyrus via tcp
cyrus-inet unix - - y - - lmtp
-o lmtp_cache_connection=yes
-o lmtp_sasl_auth_enable=yes
-o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
-o lmtp_sasl_security_options=noanonymous
#
# UUCP. Unix to Unix CoPy
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
# These are not distributed with Mandrivalinux
#
#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

##### START OF CONTENT FILTER CUSTOMIZATIONS #####
# Please see the Postfix FILTER_README for details.
# These sample entries expect your content filter to
# listen on port 10025 and to inject mail back into
# postfix on port 10026.
#
# to enable such content filter run the command
# postconf -e content_filter=smtp-filter:127.0.0.1:10025
# postconf -e smtp-filter_destination_concurrency_limit=2
# or
# postconf -e content_filter=lmtp-filter:127.0.0.1:10025
# postconf -e lmtp-filter_destination_concurrency_limit=2
# and the command
# postconf -e receive_override_options=no_address_mappings
#

127.0.0.1:10026 inet n - y - - smtpd
-o content_filter=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_client_connection_limit_exceptions=127.0.0.0/8

lmtp-filter unix - - y - - lmtp
-o lmtp_data_done_timeout=1200
-o lmtp_send_xforward_command=yes

smtp-filter unix - - y - - smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

##### END OF CONTENT FILTER CUSTOMIZATIONS #####

#cyrus unix - n n - - pipe flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
You will notice I have tried using what I think will work on the last line, a different path to 'deliver'

Here is what happens when I comment the four cyrus lines in master.cf and uncomment the one I have added

Quote:
Originally Posted by /var/log/mail/info
Oct 7 01:14:53 siege postfix/cleanup[10671]: 4B7683BE5F: message-id=<3503.192.168.0.152.1160180093.squirrel@siege>
Oct 7 01:14:53 siege postfix/qmgr[10646]: 4B7683BE5F: from=<steve@lasnobberia.net>, size=613, nrcpt=1 (queue active)
Oct 7 01:14:53 siege postfix/pipe[10674]: 4B7683BE5F: to=<steve@localhost.siege>, orig_to=<steve@localhost>, relay=cyrus, delay=0, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: No such file or directory_ 421 4.3.0 deliver: couldn't connect to lmtpd_ )
And when I comment out the one I added and uncomment the defaults

Quote:
Originally Posted by /var/log/mail/info
Oct 7 01:17:20 siege postfix/lmtp[10802]: AEE7E3BE72: to=<steve@localhost.siege>, orig_to=<steve@localhost>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=localhost.siege type=A: Host not found)
Oct 7 01:17:20 siege postfix/cleanup[10800]: C53443BE87: message-id=<20061007001720.C53443BE87@siege>
Oct 7 01:17:20 siege postfix/qmgr[10794]: C53443BE87: from=<>, size=2464, nrcpt=1 (queue active)
Oct 7 01:17:20 siege postfix/qmgr[10794]: AEE7E3BE72: removed
Oct 7 01:17:21 siege postfix/smtp[10797]: C53443BE87: to=<steve@xxxxxxxxxx.net>, relay=mail.ideal-network.co.uk[69.56.196.26], delay=1, status=sent (250 ok 1160180471 qp 1990)
Oct 7 01:17:21 siege postfix/qmgr[10794]: C53443BE87: removed
I have replaced my domain name with xxxxxx's - it seems to pass this onto the Internet, also if I e-mail a normal SMTP address (like one of my webmail accounts), it will go straight through.

Now when I get Fetchmail to receive my inbound mail...

Quote:
Originally Posted by /var/log/mail/info
Oct 7 01:23:04 siege postfix/smtpd[10843]: E50873BE6F: client=siege[127.0.0.1]
Oct 7 01:23:05 siege postfix/cleanup[10839]: E50873BE6F: message-id=<20061007001720.C53443BE87@siege>
Oct 7 01:23:05 siege postfix/qmgr[10794]: E50873BE6F: from=<>, size=3555, nrcpt=1 (queue active)
Oct 7 01:23:05 siege postfix/lmtp[10840]: E50873BE6F: to=<steve@localhost.siege>, orig_to=<steve@localhost>, relay=none, delay=1, status=bounced (Host or domain name not found. Name service error for name=localhost.siege type=A: Host not found)
Oct 7 01:23:05 siege postfix/qmgr[10794]: E50873BE6F: removed
Oct 7 01:23:05 siege postfix/smtpd[10843]: 9AD2C3BE6F: client=siege[127.0.0.1]
Oct 7 01:23:05 siege postfix/cleanup[10839]: 9AD2C3BE6F: message-id=<20061007002251.8A4F23BE87@siege>
It is throwing it out the window again.

Any help with this matter would be greatly appreciated. I sincerely hope it is not something I have been staring at for hours on end!

Regards,
Steve

Last edited by swilliams2006; 10-07-2006 at 06:37 AM.
 
Old 10-12-2006, 05:01 PM   #2
swilliams2006
Member
 
Registered: Dec 2005
Location: Kent
Distribution: Kubuntu 6.10
Posts: 32

Original Poster
Rep: Reputation: 15
I have now fixed this problem on a work of trial and error. Anybody else who may experience this problem should note:

Regardless of what FAQs say, I have used lmtp *Socket* transport rather than lmtp straight to Cyrus. In order to make this work:

master.cf:

find the line for lmtp and turn chroot off... it should look something like this:

Quote:
lmtp unix - - n - - lmtp
Notice, the 4th tab stop that I have set 'n' means chroot yes or no. If you find that you have done everything I tell you, and your /var/log/mail files still show /var/lib/imap/socket/lmtp does not exist, and you have checked it does exist then there is some other chrooting going on somewhere. If the permissions are wrong then it will say permission denied.

main.cf:

comment out any other mailbox_transport you have, and uncomment or add this

Quote:
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
cyrus.conf:

comment out (unless you use them) any other lmtp's and uncomment the socket, as below:

Quote:
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
Now make sure that the socket exists, has permission rwxrwxrwx (777 I think). I think when you restart Cyrus after making these changes it will force the correct permissions in.

Now you should just make sure that users 'cyrus' and 'postfix' are in the 'mail' group.

Best of luck,
Steve
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyrus error and postfix Sapient Linux - Networking 0 01-15-2006 12:43 PM
postfix + cyrus + mysql Sern Linux - Software 0 12-30-2005 04:00 PM
postfix+cyrus gammar Linux - Networking 0 12-30-2004 11:34 AM
Postfix/Cyrus out of office pk21 Linux - Software 0 12-03-2003 06:43 AM
postfix + cyrus + fetchmail jim_boy Linux - Software 2 02-19-2003 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration