Postfix store and forward configuration
Hi,
I would like to store a copy of all mails that pass through my Postfix mail-relay to a local mailbox on the mail server. I did the following created a user 'mailstore" this is a part of main.cf mydestination = $myhostname myhostname = mailer always_bcc = mailstore@mailer local_recipient_maps = proxy:unix:passwd.byname I get these errors in /var/log/mail.log Jan 29 21:38:17 mailer postfix/qmgr[22821]: 8D305CA348: to=<mailstore@mailer>, relay=none, delay=0.29, delays=0.22/0.06/0/0, dsn=4.3.0, status=deferred (mail transport unavailable) Jan 29 21:39:58 mailer postfix/qmgr[22821]: warning: connect to transport local: Connection refused Please, how do I make Postfix store the bcc copy to the local mailbox? Thanks for your help. |
Is this what you actually have?
Code:
mydestination = $myhostname Code:
myhostname = mailer |
I tried to switch the mydestination and myhostname lines, but it does not work either. Shall I add anything to my configuration?
Thanks |
Can you post the output of postconf -n
|
I have already solved the problem. It was in master.cf (local was not running), but now I have another one.
Jan 29 23:55:02 mailer postfix/local[25030]: EE8CBCA2A5: to=<mailstore@mailer>, relay=local, delay=0.38, delays=0.21/0.06/0/0.11, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/mailstore for user mailstore. cannot create file exclusively: No such file or directory) The directory /var/mail/ exist. I tried to change to directory permission to 777 but without any success. This is postconf -n alias_maps = hash:/etc/postfix/aliases always_bcc = mailstore@mailer append_dot_mydomain = no biff = no command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix delay_warning_time = 12h disable_vrfy_command = yes local_transport = local:$myhostname mail_name = Mailer mail_spool_directory = /var/mail mailbox_size_limit = 0 mydestination = $myhostname mydomain = localhost.localdomain myhostname = mailer mynetworks = 192.168.58.0/24 127.0.0.0/8 queue_minfree = 536870912 setgid_group = postdrop smtpd_banner = $myhostname $mail_name Thanks |
Have you tried creating the file with touch /var/mail/mailstore? Do you have selinux running? If sot try turning it off for a test with setenforce 0
|
Yes I tried to create /var/mail/mailstore manually by touch, with the same result. I don't have selinux.
I also changed the mail_spool_directory, but it does not work either. I am running postfix chrooted, do you think it could be the problem? |
I won't claim to know anything about running postfix chrooted, but did you read http://www.postfix.org/BASIC_CONFIGU...l#chroot_setup and note
"Note that a chrooted daemon resolves all filenames relative to the Postfix queue directory (/var/spool/postfix)" Don't know if that helps |
The problem is solved. It must be explicitly said, not to run local service chrooted
Code:
local unix - n n - - local |
All times are GMT -5. The time now is 12:04 AM. |