11 msgReject unknown Sender address
10 msgPostfix and archiving
5 msg-o content_filter overrides main.cf ?
1 msgPostfix 2.4.3 and 2.3.11 available
8 msgSASL authentication via dovecot?
2 msgpostfix/sasl: sql_select option missing - wtf?
3 msgmax connection rate/count/limit issues.
1 msgrequeue mails
6 msgnothing in maillog
9 msglocal and remote storage for same user
7 msgRejecting Invaliud Users - Useful Resource poin...
4 msgDistributing map files
5 msgrelay_recipient_maps for multiple destinations
13 msgauto-responders with postfix
6 msgMydestination with virtual domains
6 msgSplitting smtpd_proxy_filter in smtpd_recipient...
10 msgCan't Send to Sprint Messaging Users..
1 msgMAAWG meeting anyone?

basic postfix 2.4.1 configuration for a simple ...
\ Yashesh Bhatia (30 May 2007)
. \ mouss (30 May 2007)

5 msgStrange persistant 'timeout after DATA' from ma...
Subject:basic postfix 2.4.1 configuration for a simple standalone machine mail server
Group:Postfix-users
From:Yashesh Bhatia
Date:30 May 2007


 
Hello Postfix users,

I'm trying to setup and use postfix 2.4.1 on a single machine that
will be used as a apache,
mysql and mail server and needed some help with configuration problems.

postfix is being setup so that i can use local address class
(http://www.postfix.org/ADDRESS_CLASS_README.html) but not use the
/etc/passwd file for storing/checking email id's.

my configuration files are as follows
/etc/postfix/main.cf (i added the following lines after the original
contents of main.cf)
-------------------------------------------------------------------------------- --------------------------------------------------
# modifications made by yashesh for getting it up and running for
foobar - 30th May 2007
inet_interfaces = all
mynetworks = 127.0.0.0/8
mynetworks_style = host
mydomain = foobar.com
myorigin = $mydomain
mydestination = $mydomain
# mailbox style = Maildir
mail_spool_directory = /var/foobarmail/
local_transport = local
local_recipient_maps = mysql:/etc/postfix/mysql_local_recipient_maps.cf
relay_domains =
-------------------------------------------------------------------------------- --------------------------------------------------
/etc/postfix/mysql_local_recipient_maps.cf
# The user name and password to log into the mysql server.
user = foobar_mail
password = test12345
# The database name on the servers.
dbname = foobar_mail
# For Postfix 2.2 and later The SQL query template.
# See mysql_table(5) for details.
query = SELECT name FROM user WHERE name='%s'
-------------------------------------------------------------------------------- --------------------------------------------------
here is the table user in the db foobar_mail
mysql> desc user;
+-------+------------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------------+------+-----+-------------------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | | | |
| ts | timestamp | YES | | CURRENT_TIMESTAMP | |
+-------+------------------+------+-----+-------------------+----------------+
3 rows in set (0.05 sec)
mysql> select * from user;
+----+--------+---------------------+
| id | name | ts |
+----+--------+---------------------+
| 1 | aditya | 2007-05-30 18:02:45 |
| 2 | shiv | 2007-05-30 18:02:54 |
| 3 | anya | 2007-05-30 18:03:07 |
| 4 | karan | 2007-05-30 18:03:12 |
+----+--------+---------------------+
4 rows in set (0.04 sec)
-------------------------------------------------------------------------------- --------------------------------------------------
i then ran the command to check if the mysql configuration file works fine.
$ postmap -q aditya mysql:/etc/postfix/mysql_local_recipient_maps.cf
aditya
$ echo $?
0
$
-------------------------------------------------------------------------------- --------------------------------------------------
finally i tried to send an email to aditya but i get error
messages in the log.
$ sendmail aditya < /tmp/helloworld
$ less /var/log/mailog
May 30 18:33:07 bfc11 postfix/pickup[7298]: E581FE8064: uid=0 from=<root>
May 30 18:33:08 bfc11 postfix/cleanup[8156]: E581FE8064:
message-id=<20070530130307.E581FE8064>
May 30 18:33:08 bfc11 postfix/qmgr[6232]: E581FE8064:
from=<root>, size=272, nrcpt=1 (queue active)
May 30 18:33:09 bfc11 postfix/local[8158]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
May 30 18:33:09 bfc11 postfix/local[8158]: E581FE8064:
to=<aditya>, relay=local, delay=1.5,
delays=1.2/0.28/0/0.04, dsn=5.1.1, status=bounced (unk
nown user: "aditya")
May 30 18:33:09 bfc11 postfix/cleanup[8156]: 1E5DFE8066:
message-id=<20070530130309.1E5DFE8066>
May 30 18:33:09 bfc11 postfix/bounce[8159]: E581FE8064: sender
non-delivery notification: 1E5DFE8066
May 30 18:33:09 bfc11 postfix/qmgr[6232]: 1E5DFE8066: from=<>,
size=1860, nrcpt=1 (queue active)
May 30 18:33:09 bfc11 postfix/qmgr[6232]: E581FE8064: removed
May 30 18:33:09 bfc11 postfix/local[8158]: 1E5DFE8066:
to=<root>, relay=local, delay=0.04, delays=0.01/0/0/0.03,
dsn=2.0.0, status=sent (delivered
to maildir)
May 30 18:33:09 bfc11 postfix/qmgr[6232]: 1E5DFE8066: removed
-------------------------------------------------------------------------------- --------------------------------------------------
from the logs it shows that 'aditya' is an unknown user.

any clues why the mysql db is not used for email id lookups (is
the parameter
local_recipient_maps =
mysql:/etc/postfix/mysql_local_recipient_maps.cf would be enough ?)

thanks a lot in advance.

yashesh bhatia

----------------------------------------------------------------
Go Pre
http://www2.localaccess.com/rlalonde/pre.htm
----------------------------------------------------------------


© 2004-2008 readlist.com