LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-30-2008, 01:46 AM   #1
tklima
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Rep: Reputation: 0
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:unixasswd.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.
 
Old 01-30-2008, 03:21 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Is this what you actually have?

Code:
mydestination = $myhostname
myhostname = mailer
always_bcc = mailstore@mailer
How about trying

Code:
myhostname = mailer
mydestination = $myhostname
always_bcc = mailstore@mailer
 
Old 01-30-2008, 09:08 AM   #3
tklima
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
I tried to switch the mydestination and myhostname lines, but it does not work either. Shall I add anything to my configuration?

Thanks
 
Old 01-30-2008, 09:19 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you post the output of postconf -n
 
Old 01-31-2008, 02:12 AM   #5
tklima
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thumbs up

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
 
Old 01-31-2008, 02:37 AM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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
 
Old 01-31-2008, 03:12 AM   #7
tklima
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 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?
 
Old 01-31-2008, 04:11 AM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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
 
Old 02-01-2008, 09:56 AM   #9
tklima
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
The problem is solved. It must be explicitly said, not to run local service chrooted

Code:
local     unix  -       n       n       -       -       local
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configure Postfix for Store and Forward Cyberitas Linux - General 17 01-31-2009 01:02 AM
store emails on database (postfix) eduac Linux - General 1 07-30-2006 02:31 AM
Postfix forward arjanhs Linux - Software 4 04-06-2006 03:01 AM
Postfix forward to another server BorgKiller *BSD 1 05-27-2005 11:07 AM
Where does YaST store it's configuration? mikemrh9 Suse/Novell 4 04-05-2005 08:41 AM


All times are GMT -5. The time now is 05:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration