Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HowTO: Postfix - MailScanner - DBMail - SASL - TLS
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Tue Mar 22, 2005 9:17 pm    Post subject: HowTO: Postfix - MailScanner - DBMail - SASL - TLS Reply with quote

Updated 27/06/05
postfix main.cf tweaks
- Spam bounce
- Virtual Domains
- Trim main.cf
- Additional Notes added

This has been in the planning for quite some time, but I just recently got the time and equipment to get it started. Here are my notes so far. I do not cover every step along this process, most of these programs come with well written README or INSTALL files that should not be overlooked. I am very new to postfix, so if anyone spots somthing that should be changed, please post it.

This is without a doubt the easiest virtual mail server I have ever setup.

postfix->MailScanner->postfix->DBMail

Minimum recommended use flags: sasl mysql pam apache2 innodb ssl postfix crypt


If you updated any of your use flags, try the following command to see what might need to be rebuild with the new libraries
# emerge -N world --deep -pv

Here are the packages I am currently using:
    mail-filter/spamassassin 3.0.2-r1
    mail-filter/razor 2.61
    dev-python/pyzor 0.4.0-r1
    mail-filter/dcc 1.2.28-r1
    app-antivirus/clamav 0.83
    mail-mta/postfix 2.1.5-r2
    dev-db/mysql 4.0.24
You have the option to use either just use SASL or SASL with pam_mysql.
Completely your choice.

In order to avoid problems with MailScanner, it is very important that after you emerge razor, you execute the following commands:
Code:
mkdir /etc/razor
razor-admin -create -home=/etc/razor

Razor has been known to create it's log file in /var/spool/postfix/hold, and MailScanner will stop scanning if any files are in this dir.

If you choose just to use sasl, then you will need to emerge dev-libs/cyrus-sasl >= 2.1.20-r2
Which is currently masked. I just used:

Code:
ACCEPT_KEYWORDS="~x86" emerge -v cyrus-sasl


If you don't want to emerge a masked package and you want to go the other route, then you will need
    dev-libs/cyrus-sasl 2.1.20
    sys-libs/pam_mysql 0.5
I used the MailScanner ebuild from https://bugs.gentoo.org/show_bug.cgi?id=36060

I know that there is a dbmail ebuild, but I built it from source - http://www.dbmail.org/

I configured postfix to run in the chroot'd env by executing:
Code:
/usr/share/doc/postfix-2.1.5-r2/examples/chroot-setup/LINUX2


I also had to change the following line in the master.cf
Quote:
smtp inet n - - - - smtpd


All I did was replace the second "n" with a "-". This tells postfix to run in a chroot.

I got postfix working before I made any of the following changes. Mail in and out with no problems. The postfix website http://www.postfix.org/documentation.html has lots of great documentation. If you are new to postfix, like me, I strongly recommend going through the docs.

Next, I setup MailScanner. Make sure postfix is in your use flags! I put it in my portage_overlay, and emerg’d it. Currently, it setups up 2 init scripts, MailScanner and MailScanner-mta. Due to my configuration, I don’t start the MailScanner-mta service and I comment out MailScanner-mta in the /etc/init.d/MailScanner:

Code:
depend() {
        need net # MailScanner-mta
        after postfix
        use logger dns
}


In the /etc/MailScanner/MailScanner.conf, I only changed some basic settings. (setting the Queue paths is required!):
There are many more options to set, but I just wanted to get things working first. Many of those options are just set so that I know that MailScanner is working. Read through the file, it is well commented.
Code:
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
Always Include SpamAssassin Report = yes
Sign Clean Messages = yes
Use SpamAssassin = yes


/etc/mail/spamassassin/local/cf:
Code:
rewrite_header Subject *****SPAM*****
bayes_sql_override_username     "global"
bayes_store_module              Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn                   DBI:mysql:spamassassin:localhost
bayes_sql_username              bayesdb
bayes_sql_password              mypassword
use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1
required_hits 5.5
report_safe 2
use_terse_report 1
dns_available yes
skip_rbl_checks 1
use_razor2 1
use_pyzor 1
use_dcc 1
ok_languages all
ok_locales all


For spamassassin, I imported my old bayes_db into my SQL database and could check connectivity by just executing:
sa-learn --dump magic -D

At this point, you should be able to start postfix and mailscanner.

/etc/init.d/postfix start
/etc/init.d/MailScanner start

Send an e-mail to an external account

# echo Test | mutt me@foo.yahoo.com

When you receive the e-mail, check the headers for MailScanner entries.

In order to get SASL w/ TLS working with the chroot'd Postfix, I added the following lines to my /etc/fstab:

/var/lib/sasl2 /var/spool/postfix/var/lib/sasl2 bind bind 0 0
/var/run/mysqld /var/spool/postfix/var/run/mysqld bind bind 0 0

Of course I created the /var/spool/postfix/var/lib/sasl2 and the /var/spool/postfix/var/run/mysqld directories first

I also generated my own certs using:


Code:
cd /etc/ssl/misc/
perl CA.pl -newca
perl CA.pl -newreq
perl CA.pl -sign


And then copying them to /etc/postfix/ssl/

These lines will allow postfix to access the mysql and sasl sockets from the chroot.

For my master.cf, I added the below line under the line for smtp:

Quote:
dbmail-lmtp unix - - n - - lmtp


This is to tell postfix to hand the mail over to dbmail.

Current main.cf
Code:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix

sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme

debug_peer_level = 2
debug_peer_list = 127.0.0.1
debugger_command =
        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
        xxgdb $daemon_directory/$process_name $process_id & sleep 5

# SASL
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes

# TLS
smtpd_tls_auth_only = yes
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/ozone.key
smtpd_tls_cert_file = /etc/postfix/ssl/ozone.crt
smtpd_tls_CAfile = /etc/postfix/ssl/ozone.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

mynetworks_style = subnet
mynetworks = 127.0.0.0/8 192.168.10.0/24

alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases

# Server
mailbox_transport = dbmail-lmtp:localhost:24
header_checks = regexp:/etc/postfix/header_checks

myhostname = your.fqdn.tld
mydomain = your.fqdn.tld
myorigin = $mydomain
mydestination = localhost, your.fqdn.tld, $virtual_alias_domains


local_recipient_maps = $virtual_alias_domains $virtual_alias_maps
unknown_local_recipient_reject_code = 550

virtual_alias_domains = mysql:/etc/postfix/virtual-domains.cf

virtual_alias_maps =mysql:/etc/postfix/valiasdom.cf mysql:/etc/postfix/virtual_aliases.cf

smtpd_recipient_restrictions =  reject_invalid_hostname, reject_non_fqdn_recipient, reject_non_fqdn_sender, reject_unauth_pipelining, reject_unknown_recipient_domain, permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, permit

smtpd_sender_restrictions =  permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/all-users.cf



/etc/postfix/header_checks:
Code:
/^Received:/ HOLD


/etc/postfix/virtual-domains.cf:

Code:
user = dbmail
password = password
dbname = dbmail
table = dbmail_vdomains
select_field = domain
where_field = domain


/etc/postfix/virtual_aliases.cf:
Code:
user = dbmail
password = password
hosts = localhost
dbname = dbmail
table = dbmail_aliases
select_field = alias
where_field = alias


/etc/postfix/valiasdom.cf:
Code:
user = dbmail
password = password
dbname = dbmail
table = dbmail_vdomains
select_field = concat( '@', pridomain )
where_field = concat( '@', domain )
additional_conditions = and pridomain is not NULL


/etc/postfix/all-users.cf
Code:

user = dbmail
password = password
hosts = localhost
dbname = dbmail
table = dbmail_aliases left join dbmail_vdomains on dbmail_vdomains.client_idnr = dbmail_aliases.client_idnr
select_field = case when count(dbmail_aliases.alias) > 0  then "OK" when count(dbmail_aliases.alias) = 0  then "REJECT" END AS 'access'
where_field = concat(LEFT(dbmail_aliases.alias, LOCATE('@', dbmail_aliases.alias)),dbmail_vdomains.domain)


Table structure for table 'dbmail_vdomains'

Code:
+------------+-------------+------+-----+---------+----------------+
| Field      | Type        | Null | Key | Default | Extra          |
+------------+-------------+------+-----+---------+----------------+
| id         | int(7)      |      | PRI | NULL    | auto_increment |
| domain     | varchar(40) |      | UNI |         |                |
| comment    | varchar(40) | YES  |     | NULL    |                |
| pridomain  | varchar(40) | YES  |     | NULL    |                |
| client_idnr| bigint(21)  | NO   |     | NULL    |                |
+------------+-------------+------+-----+---------+----------------+


Code:

id   domain            comment               pridomain      client_idnr
1    foo.bar          Primary Domain            NULL         6
2    domain.tld       Primary Domain            NULL         7
3    foo.bar.uk       Alias for foo.bar         foo.bar      6
4    domain.tld.mx    Alias for domain.tld      domain.tld   7
5    foo.bar.mx       Alias for foo.bar         foo.bar      6


SQL to create table 'dbmail_vdomains':
Code:
CREATE TABLE `dbmail_vdomains` (
  `id` int(7) NOT NULL auto_increment,
  `domain` varchar(40) NOT NULL default '',
  `comment` varchar(40) default NULL,
  `pridomain` varchar(40) default NULL,
  `client_idnr` bigint(21) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `domain` (`domain`)
) TYPE=InnoDB AUTO_INCREMENT=27 ;


Download the DBMail source and unpack it. Read through the README and INSTALL and the INSTALL.postfix for better instructions. You will need to copy the given dbmail.conf to /etc/ and make some changes. The only changes I made were for the database connection.

/etc/dbmail.conf:
Code:
[DBMAIL]
host=localhost
sqlport=3306
sqlsocket=/var/run/mysqld/mysqld.sock
user=dbmail
pass=mypassword
db=dbmail
POSTMASTER=postmaster@foo.com
TRACE_LEVEL=1

[SMTP]
SENDMAIL=/usr/sbin/sendmail
AUTO_NOTIFY=no
AUTO_REPLY=no
TRACE_LEVEL=1

[LMTP]
EFFECTIVE_USER=nobody
EFFECTIVE_GROUP=nogroup
BINDIP=127.0.0.1
                         
PORT=24
NCHILDREN=20
MAXCHILDREN=15
MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=10000
TIMEOUT=300
RESOLVE_IP=yes
TRACE_LEVEL=1
MAX_ERRORS=500

[POP]
EFFECTIVE_USER=nobody
EFFECTIVE_GROUP=nogroup
BINDIP=*
PORT=110
NCHILDREN=30
MAXCHILDREN=200
MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=10000
TIMEOUT=300
RESOLVE_IP=yes
POP_BEFORE_SMTP=no
TRACE_LEVEL=1

[IMAP]
EFFECTIVE_USER=nobody
EFFECTIVE_GROUP=nogroup
BINDIP=*
PORT=143
NCHILDREN=5
MAXCHILDREN=100

MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=10000
TIMEOUT=4000
RESOLVE_IP=yes
IMAP_BEFORE_SMTP=no
TRACE_LEVEL=1


I got the init scripts from the ebuild


/etc/conf.d/saslauthd:
Code:
SASLAUTHD_OPTS=""
SASLAUTHD_OPTS="${SASLAUTH_MECH} -a pam -r"


<Just SASL>
If you plan on using just SASL:
This will allow you to authenticate your through your SMTP server using: crypt, plaintext, md5
/etc/sasl2/smtpd.conf:
Code:
pwcheck_method: auxprop
auxprop_plugin: sql
allowanonymouslogin: no
allowplaintext: yes
mech_list: PLAIN LOGIN
srp_mda: md5
srvtab: /dev/null
opiekeys: /dev/null
password_format: crypt
sql_user: dbmail
sql_passwd: mypassword
sql_hostnames: localhost
sql_database: dbmail
sql_select: SELECT passwd FROM dbmail_users WHERE userid = '%u@%r'
log_level: 10
sql_verbose: yes

</Just SASL>

<SASL with pam_mysql>
If you plan on using SASL with pam_mysql:
/etc/pam.d/smtp:
This will allow you to authenticate your through your SMTP server using: crypt, plaintext, md5
Watch out for the line wrap. When you create the smtp file, there should only be 2 lines.
Code:
auth    sufficient      pam_mysql.so user=dbmail passwd=password host=127.0.0.1 db=dbmail table=dbmail_users usercolumn=userid passwdcolumn=passwd crypt=1

account required        pam_mysql.so user=dbmail passwd=password host=127.0.0.1 db=dbmail table=dbmail_users usercolumn=userid passwdcolumn=passwd crypt=1


/etc/sasl2/smtpd.conf:

Code:
pwcheck_method:saslauthd
mech_list: plain login
</SASL with pam_mysql>

/etc/init.d/dbmail-lmtpd:
Code:
#!/sbin/runscript
#
# chkconfig: - 91 35
# description: Starts and stops the dbmail-lmtpd daemon
#

PROGRAM=dbmail-lmtpd
BIN_DIR=/usr/local/sbin

PID_DIR=/var/run
PID=pid


# Where is the dbmail.conf file located?
CONFIG=/etc/dbmail.conf

# opts="${opts} reload"

depend() {
        need net
        # This won't cause a hard failure if neither is installed, however.
        use mysql
        after mysql mta

}

initService() {
    # Avoid using root's TMPDIR
    unset TMPDIR

    # Check that config file exists.
    [ -f $CONFIG ] || exit 0

    RETVAL=0
}

start() {
        initService
        ebegin "Starting DBMail LMTP daemon ($PROGRAM)"
            start-stop-daemon --start --quiet \
              --pidfile $PID_DIR/$PROGRAM.$PID \
              --exec $BIN_DIR/$PROGRAM \
              --name $PROGRAM \
              -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
        eend $?
}

stop() {
        initService
        ebegin "Stopping DBMail LMTP daemon ($PROGRAM)"
            start-stop-daemon --stop --quiet --retry 5 \
              --pidfile $PID_DIR/$PROGRAM.$PID
        eend $?
}


/etc/init.d/dbmail-pop3d:
Code:
#!/sbin/runscript
#
# chkconfig: - 91 35
# description: Starts and stops the dbmail-pop3d daemon
#

PROGRAM=dbmail-pop3d

BIN_DIR=/usr/local/sbin

PID_DIR=/var/run
PID=pid


# Where is the dbmail.conf file located?
CONFIG=/etc/dbmail.conf

# opts="${opts} reload"

depend() {
        need net
        # This won't cause a hard failure if neither is installed, however.
        use mysql
        use pgsql
        after mta
}

initService() {
    # Avoid using root's TMPDIR
    unset TMPDIR

    # Check that config file exists.
    [ -f $CONFIG ] || exit 0

    RETVAL=0
}

start() {
        initService
        ebegin "Starting DBMail POP3 daemon ($PROGRAM)"
            start-stop-daemon --start --quiet \
              --pidfile $PID_DIR/$PROGRAM.$PID \
              --exec $BIN_DIR/$PROGRAM \
              --name $PROGRAM \
              -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
        eend $?
}

stop() {
        initService
        ebegin "Stopping DBMail POP3 daemon ($PROGRAM)"
            start-stop-daemon --stop --quiet --retry 5 \
              --pidfile $PID_DIR/$PROGRAM.$PID
        eend $?
}


/etc/init.d/dbmail-imapd:
Code:
#!/sbin/runscript
#
# chkconfig: - 91 35
# description: Starts and stops the dbmail-imapd daemon
#

PROGRAM=dbmail-imapd
BIN_DIR=/usr/local/sbin

PID_DIR=/var/run
PID=pid

# Where is the dbmail.conf file located?
CONFIG=/etc/dbmail.conf

# opts="${opts} reload"

depend() {

        need net
        # This won't cause a hard failure if neither is installed, however.
        use mysql
        use pgsql
        after mta
}

initService() {
    # Avoid using root's TMPDIR
    unset TMPDIR

    # Check that config file exists.
    [ -f $CONFIG ] || exit 0

    RETVAL=0
}

start() {
        initService
        ebegin "Starting DBMail IMAP daemon ($PROGRAM)"
            start-stop-daemon --start --quiet \
              --pidfile $PID_DIR/$PROGRAM.$PID \
              --exec $BIN_DIR/$PROGRAM \
              --name $PROGRAM \
              -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
        eend $?
}

stop() {
        initService
        ebegin "Stopping DBMail IMAP daemon ($PROGRAM)"
            start-stop-daemon --stop --quiet --retry 5 \
              --pidfile $PID_DIR/$PROGRAM.$PID
        eend $?
}


Currently with this setup, my mail server is working great. Now all I have to do is setup mysql to listen on an external ip address, setup another server with almost the same settings, setup sql replication and I should have some pretty reliable and redundant mail servers. Of course the switchover won't be automatic, yet...


Additional Notes:

Taken from my Wiki entry at dbmail.org

While building my first DBMail server, I was happy to see that the full migration from my old mail server worked almost flawlessly, I ran into one snag. My company has many domains, and most of those domains are just aliases. I knew that I could create an alias for every user for every aliased domain, but that would exponentially increase the size of my alias table, I could have also created and alias like @foo.bar →deliver_to→ @foo.bar.uk, but I wanted to do something a bit cleaner and easier to manage since they are constantly adding and removing alias domains. So what I did was create a table for managing the domains. I named it “dbmail_vdomains” and it’s structure is very minimal. It contains the following columns: id, domain, comment,pridomain, client_idnr.

When I created my user accounts, I used a unique client_idnr for each new domain. So, each user had it’s main alias as user@foo.bar deliver_to user_idnr, and every account and alias for the foo.bar domain uses the same client_idnr. By giving all of the accounts in the same domain the same client_idnr, you can use sql to do some nice things. The next step is to populate the table.

After putting the server up and watching the logs all day long, I noticed that about 50% of all mail was spam, and even worse, it was being sent to non-existing e-mail addresses. I know that postix will deny mail for non-existing users (local_recipient_maps), but when you alias an entire domain, it won’t block e-mail to non-existing users for the aliased domain. So e-mail sent to baduser@foo.bar will immediatly bounce back with a 550, but if it were sent to baduser@foo.bar.uk, then postifx would accept the mail, and then bounce it. Since I am doing spam, content and virus checking for every piece of mail, I didn’t want to waste the resources on this junk. So I implemented the check_recipient_access in the smtpd_sender_restrictions.

The check_recipient_access will basically lookup an e-mail address and will see if the mail server will accept mail for that account. So all-users.cf, uses the dbmail_vdomains and the dbmail_aliases tables joining them using the client_idnr. So it creates a list of all possible e-mail addresses including all aliases including all aliased domains. When postfix is receiving an e-mail, it will check the recipient e-mail address to see if it accepts mail for that address. If it finds an e-mail address that matches, it will return, OK and the mail will be accepted and processed, if no e-mail address is found, it will return “REJECT”, and postfix will reject the mail, not accepting it for processing. So far my mail server has rejected over 50,000 pieces of mail because of this. The overhead of looking up the e-mail address is much much less than processing mail that couldn’t be delivered in the first place.

Good luck

03/38/05 Just found this link. It does not include DBMail, but it is a good reference
http://gentoo-wiki.com/HOWTO_Email_Virus_Scanner_--_Mailscanner


Last edited by msalerno on Tue Nov 22, 2005 5:24 pm; edited 33 times in total
Back to top
View user's profile Send private message
cchee
Apprentice
Apprentice


Joined: 29 Jul 2003
Posts: 214
Location: NYC

PostPosted: Tue Apr 05, 2005 8:20 pm    Post subject: Reply with quote

dbmail also has administrator interface.
http://library.mobrien.com/dbmailadministrator/
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Tue Apr 05, 2005 8:37 pm    Post subject: Reply with quote

I have set it up, and it looks pretty good. I just have to do some more reading on it.

Thanks
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Apr 22, 2005 9:52 pm    Post subject: Reply with quote

I started writing some scripts to make the migration from Qmail/Vpopmail/SQL to the above configuration easier. I posted them on the dbmail wiki if anyone is ever interested.

http://dbmail.org/dokuwiki/doku.php?id=mirgating_from_qmail_vpopmail_sql
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 12:02 pm    Post subject: Reply with quote

There is no config file /etc/postfix/valias.cf
What do i put inside it? this is not mentioned above.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
srid
n00b
n00b


Joined: 15 Feb 2004
Posts: 48
Location: /home/india

PostPosted: Wed Apr 27, 2005 12:54 pm    Post subject: Reply with quote

Ok, this is killing me..

I've been trying to get SMTP AUTH working from past one and half weeks now but nothing seems to work

I will paste the configuration files below..

I'm using the howto on http://high5.net/howto

main.cf file

Code:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix

default_privs = nobody
myhostname = domain.com
mydomain = domain.com
myorigin = $mydomain
inet_interfaces = all
mydestination = localhost.$mydomain, localhost

unknown_local_recipient_reject_code = 550
mynetworks = 10.1.0.0/16, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
transport_maps = hash:/etc/postfix/transport_maps
mail_spool_directory = /var/spool/mail
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 20
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme

default_destination_concurrency_limit = 2
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:207
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 207
virtual_transport = virtual
virtual_uid_maps = static:207

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions =
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unlisted_recipient,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain,
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination

disable_vrfy_command = yes



The problem is that postfix does'nt even bother to check for smtp auth. Even if nothing is specified, it just relay's the mail if the mynetworks parameter is satisfied

dev-libs/cyrus-sasl-2.1.20-r2 +authdaemond -berkdb* +crypt -debug* +gdbm* +java -kerberos -ldap +mysql -ntlm_unsupported_patch +pam -postgres -sample -srp +ssl -static -urandom
net-libs/courier-authlib-0.55 -berkdb +crypt -debug +gdbm -ldap +mysql +pam -postgres (-uclibc)
net-mail/courier-imap-4.0.1 -berkdb -debug -fam +gdbm -ipv6 +nls (-selinux)
mail-mta/postfix-2.1.5-r2 -ipv6 -ldap -mailwrapper -mbox +mysql +pam -postgres +sasl (-selinux) +ssl -vda

This is my configuration files..

Code:
sasl2 # cat /etc/sasl2/smtpd.conf
 $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.sasl,v 1.2 2004/07/18 03:26:56 dragonheart Exp $
pwcheck_method:pam
pwcheck_method: auxprop
auxprop_plugin: mysql
allowanonymouslogin: no
allowplaintext: yes
mech_list: PLAIN LOGIN DIGEST-MD5 CRAM-MD5
#mech_list: CRAM-MD5 DIGEST-MD5
srp_mda: md5
srvtab: /dev/null
opiekeys: /dev/null
password_format: crypt
sql_user: postfix
sql_passwd: password-replaced
sql_hostnames: localhost
ql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'


I am confused on how to start saslauthd as it only supports

sasl2 # saslauthd -v
saslauthd 2.1.20
authentication mechanisms: getpwent pam rimap shadow

I tried with shadow but nothing worked.

This is my

/etc/courier/authlib/authmysqlrc

Code:
#DEFAULT_DOMAIN         
MYSQL_CRYPT_PWFIELD     password
#MYSQL_CLEAR_PWFIELD     clear
MYSQL_DATABASE          postfix
MYSQL_GID_FIELD         '207'
MYSQL_HOME_FIELD        '/usr/local/virtual'
MYSQL_LOGIN_FIELD       username
MYSQL_MAILDIR_FIELD     maildir
MYSQL_NAME_FIELD        name
MYSQL_OPT               0
MYSQL_PASSWORD        password-replaced
MYSQL_PORT              3306
MYSQL_SERVER            localhost
MYSQL_SOCKET            /var/run/mysqld/mysqld.sock
MYSQL_UID_FIELD         '207'
MYSQL_USERNAME          postfix
MYSQL_USER_TABLE        mailbox


Extracts of ldd /usr/lib/postfix/smtp

Code:

        libpam.so.0 => /lib/libpam.so.0 (0xb7f4a000)
        libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0xb7f0d000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7eaf000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7dcc000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7db9000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0xb7d0f000)


Code:

     ldd /usr/lib/courier/courier-authlib/authdaemond
        linux-gate.so.1 =>  (0xffffe000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7fd9000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7fd6000)
        libcourierauthcommon.so.0 => /usr/lib/courier-authlib/libcourierauthcommon.so.0 (0xb7fcc000)
        libcourierauth.so.0 => /usr/lib/courier-authlib/libcourierauth.so.0 (0xb7fc7000)
        libc.so.6 => /lib/libc.so.6 (0xb7ecc000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fee000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7ea0000)


The problem is that postfix is not even querying for the user name and the password. What might be the problem?



Thx in advance
_________________
Gentoo n00bie
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 1:56 pm    Post subject: Reply with quote

MooktaKiNG wrote:
There is no config file /etc/postfix/valias.cf
What do i put inside it? this is not mentioned above.


My apologies, I have updated the above howto.
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 2:15 pm    Post subject: Reply with quote

srid wrote:
I've been trying to get SMTP AUTH working from past one and half weeks now but nothing seems to work
I will paste the configuration files below..
I'm using the howto on http://high5.net/howto


I'm sorry, but I have never setup a postfixadmin system. You should try comparing your main.cf with the one I have posted above.

One thing I see is that your smtpd_sasl_local_domain, is set. I have read a few posts that setting it to a value might cause problems.
Back to top
View user's profile Send private message
Larro
n00b
n00b


Joined: 25 Apr 2005
Posts: 3
Location: Florida, USA

PostPosted: Wed Apr 27, 2005 2:48 pm    Post subject: Reply with quote

srid wrote:
Ok, this is killing me..
I've been trying to get SMTP AUTH working from past one and half weeks now but nothing seems to work
I will paste the configuration files below..


I would start with changing your my networks field to display the following.
Code:

mynetworks = 127.0.0.0/8


This way when you send an email from another computer (besides your server) inside your network it's treated like it's authenticating from outside your network. I would also tail -f /var/log/mail/current (while sending an email) to give a better idea where the problem lies.

I think you might be missing some sasl entries in your main.cf here's what I have.
Code:

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_sasl_application_name = smtpd
smtpd_recipient_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        check_relay_domains


Also I'm using saslauthd in my /etc/sasl2/smtp.conf. I don't think your supposed to have two pwcheck_method.

If all fails you might want to try using pam_mysql. Msalerno has some really good documentation on it above.
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 3:36 pm    Post subject: Reply with quote

msalerno wrote:
MooktaKiNG wrote:
There is no config file /etc/postfix/valias.cf
What do i put inside it? this is not mentioned above.


My apologies, I have updated the above howto.


The dbmail_vdomains needs to be created by hand, correct? if so is this compatible with the way dbmail does things.
Do i need to enter the domains by hand?

also could you give the sql codes for this.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 4:07 pm    Post subject: Reply with quote

Correct, the dbmail_vdomains needs to be manually created and populated.
I have updated the howto to include the sql to create and populate the table.
I don't know of any reason that this change would effect dbmail. It is working great over here.

FYI. I also found an error regarding populating the table and updated the howto.
Basically, the seconday domains need to be put in with a @ before the domain name.
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 4:56 pm    Post subject: Reply with quote

I have done everything you said in the howto, but it seems that i can't send an email to dbmail.

Postfix collects all the email, and i can see it in mailq, but it doesn't seem to get deliverd to dbmail.

The output that i get is:
Code:

Apr 27 17:55:03 mail postfix/pickup[3133]: 286DA61C5B: uid=0 from=<root>
Apr 27 17:55:03 mail postfix/cleanup[3518]: 286DA61C5B: hold: header Received: by mail.mooktakim.com (Postfix, from userid 0)??id 286DA61C5B; Wed, 27 Apr 2005 17:55:03 +0100 (BST) from local; from=<root@mooktakim.com> to=<mma@mooktakim.com>
Apr 27 17:55:03 mail postfix/cleanup[3518]: 286DA61C5B: message-id=<20050427165502.GA3514@mail.mooktakim.com>


As you can postfix knows the email is being sent. but it doesn't go to dbmail.

dbmail is working i think becuase i can access it through imap.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 5:03 pm    Post subject: Reply with quote

Is the lmtp daemon running?

Do you have this line in your main.cf?
mailbox_transport = dbmail-lmtp:localhost:24

If you post your configs, I'll see what I can find.

Does the output of `ps -ef | grep dbmail` show dbmail-pop3d dbmail-imapd and dbmail-lmtpd ?
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:12 pm    Post subject: Reply with quote

What i have is exactly what you posted.

I'll copy it here anyway:
Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = mail.mooktakim.com
mydomain = mooktakim.com
myorigin = $mydomain
inet_interfaces = all
mydestination = mysql:/etc/postfix/virtual-domains.cf
local_recipient_maps = $alias_maps $virtual_mailbox_maps
mynetworks_style = host
mynetworks = 127.0.0.0/8
relayhost =
mailbox_transport = dbmail-lmtp:localhost:24
header_checks = regexp:/etc/postfix/header_checks
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme
default_destination_concurrency_limit = 2
local_destination_concurrency_limit = 2
alias_database = mysql:/etc/postfix/sql-recipients.cf
alias_maps = mysql:/etc/postfix/sql-recipients.cf
virtual_alias_maps = mysql:/etc/postfix/valias.cf

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes

smtpd_tls_auth_only = yes
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes

smtpd_tls_key_file = /etc/postfix/newreq.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem

smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

smtpd_recipient_restrictions = reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, reject_unknown_sender_domain, reject_unknown_recipient_do
main, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unlisted_recipien, reject_unauth_pipelining, permit

smtpd_client_connection_count_limit = 15
disable_vrfy_command = yes


I really have no idea why this is. I've also tried with:
Code:
smtpd_recipient_restrictions =  permit_mynetworks,
                                permit_sasl_authenticated,
                                reject_unauth_destination

Becuase i had problems with that in the past.

I know dbmail is amazing. But for god sakes some documentation is needed. There is nothing in their homepage.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 5:20 pm    Post subject: Reply with quote

Looks good, what about the output of the ps command

ps -ef | grep dbmail

Do you have verbose logging enabled for postfix and lmtp?
Just add the -v

/etc/postfix/master.cf

smtp inet n - y - - smtpd -v
dbmail-lmtp unix - - n - - lmtp -v

In your /etc/dbmail.conf

Increase the trace levels to increast verbose output to your maillog, then post any errors.


Last edited by msalerno on Wed Apr 27, 2005 5:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:23 pm    Post subject: Reply with quote

Code:
root      3305     1  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3307  3305  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3309  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3311  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3313  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3315  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3317  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3319  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3321  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3323  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3325  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3327  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3329  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3331  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3333  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3335  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3337  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3339  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3341  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3343  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3345  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
nobody    3347  3307  0 17:53 ?        00:00:00 /usr/sbin/dbmail-lmtpd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-lmtpd.pid
root      3407     1  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3409  3407  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3411  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3413  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3415  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3417  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3419  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3421  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3423  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3425  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3427  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3429  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3431  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3433  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3435  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3437  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3439  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3441  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3443  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3445  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3447  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3449  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3451  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3453  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3455  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3457  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3459  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3461  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid
nobody    3463  3409  0 17:53 ?        00:00:00 /usr/sbin/dbmail-imapd -f /etc/dbmail.conf -p /var/run/dbmail/dbmail-imapd.pid


By the way i'm using the ebuild, i didn't want to compile from scratch, i would like an easy uninstall :D
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:24 pm    Post subject: Reply with quote

also i'm not using chroot
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:28 pm    Post subject: Reply with quote

Code:
smtp      inet  n       -       n       -       -       smtpd -v


and:
Code:
# DBMail
dbmail-lmtp     unix    -       -       n       -       -       lmtp -v


tried it. but it doesn't give any extra messages.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 5:31 pm    Post subject: Reply with quote

Did you restart postfix and dbmail-lmtp after making the changes ?

If you installed from source, the way to uninstall is to remove the installed files, the binary files in /usr/local/sbin, the config file in /etc and the man files in /usr/local/man

A rm would work just as good as an unmerge


Last edited by msalerno on Wed Apr 27, 2005 5:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:37 pm    Post subject: Reply with quote

yes
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 5:38 pm    Post subject: Reply with quote

Did you install MailScanner too?
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:39 pm    Post subject: Reply with quote

no i didn't. i was thinking of installing amavis.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Apr 27, 2005 5:42 pm    Post subject: Reply with quote

Ahhh, that is good information to have!!

Comment out the line that reads:

header_checks = regexp:/etc/postfix/header_checks

FYI - MailScanner is now in Portage as a masked package.
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 5:53 pm    Post subject: Reply with quote

WAAAHHHH!!! i was getting crazy over this :D:D:D

Anyway i got another problem:

Code:

Apr 27 18:50:51 mail postfix/pickup[4553]: E7CDE61E08: uid=0 from=<root>
Apr 27 18:50:52 mail postfix/cleanup[4921]: E7CDE61E08: message-id=<20050427175051.GA4917@mail.mooktakim.com>
Apr 27 18:50:52 mail postfix/qmgr[4554]: E7CDE61E08: from=<root@mooktakim.com>, size=425, nrcpt=1 (queue active)
Apr 27 18:50:52 mail postfix/lmtp[4928]: E7CDE61E08: to=<mma@mooktakim.com>, relay=none, delay=1, status=bounced (Host or domain name not found. Name service error for name=localhost type=A: Host not found)
Apr 27 18:50:52 mail postfix/cleanup[4921]: F02A261CD1: message-id=<20050427175052.F02A261CD1@mail.mooktakim.com>
Apr 27 18:50:53 mail postfix/qmgr[4554]: F02A261CD1: from=<>, size=2218, nrcpt=1 (queue active)
Apr 27 18:50:53 mail postfix/qmgr[4554]: E7CDE61E08: removed
Apr 27 18:50:53 mail postfix/lmtp[4928]: F02A261CD1: to=<root@mooktakim.com>, relay=none, delay=1, status=bounced (Host or domain name not found. Name service error for name=localhost type=A: Host not found)
Apr 27 18:50:53 mail postfix/qmgr[4554]: F02A261CD1: removed


The email is bouncing.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 27, 2005 6:12 pm    Post subject: Reply with quote

it now only works when i disable dns lookup (INSTALL.postfix.gz):
Code:
-o disable_dns_lookups=yes


I would rather have this turned on :D

Anyway for the time being it works well. Its SUPER fast!!!

Does anyone know of a better admin, then mensioned, already. Since that admin is just unnecesarily complicated.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum