||3rd January 2007 17:26
Issues with Postfix using "Virtual Users And Domains With Postfix, Courier And MySQL"
Hello, I recently installed Zod - Fedora Core 6 and have been running through this HowTO "Virtual Users And Domains With Postfix, Courier And MySQL (Fedora Core 5)". I completed everything up to the point you telnet localhost 25, and receive no response back from postfix. See the quote box:
[root@lace ~]# telnet localhost 25
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Some background for anyone able to assist me: Currently have kyse.us domain. kyse.us points directly to my box (for purposes of letting people using port 27910 for quake 2 connect). www.kyse.us
is redirected to www2.kyse.us:81, and webmail.kyse.us is directed to webmail2.kyse.us:81. My intension is to leave www.kyse.us
for regular web space, and use the webmail.kyse.us for connecting to the mail on this server, and also using a webmail interface if I can get one set up. The box is behind a router/firewall, however the ports are open. SELinux is disable, as is the box's firewall.
[root@lace ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.7 webmail2.kyse.us webmail2
/etc/postfix/main.cf file - edited out a bunch of #Description lines to reduce post to 10k.
[root@lace ~]# cat /etc/postfix/main.cf
# SOFT BOUNCE
#soft_bounce = no
# LOCAL PATHNAME INFORMATION
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
# QUEUE AND PROCESS OWNERSHIP
mail_owner = postfix
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#myhostname = domain.tld
#myhostname = virtual.domain.tld
mydomain = kyse.us
myhostname = webmail2.$mydomain
# SENDING MAIL
#myorigin = $myhostname
#myorigin = $mydomain
# RECEIVING MAIL
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = all
#proxy_interfaces = 22.214.171.124
mydestination = localhost, localhost.localdomain, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
# TRUST AND RELAY CONTROL
#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host
#mynetworks = 126.96.36.199/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
#relay_domains = $mydestination
# INTERNET OR INTRANET
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
# REJECTING UNKNOWN RELAY USERS
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
# INPUT RATE CONTROL
#in_flow_delay = 1s
# ADDRESS REWRITING
# "USER HAS MOVED" BOUNCE MESSAGES
# TRANSPORT MAP
# ALIAS DATABASE
#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
#recipient_delimiter = +
# DELIVERY TO MAILBOX
#home_mailbox = Mailbox
#home_mailbox = Maildir/
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
#mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
# local_destination_recipient_limit = 300
# local_destination_concurrency_limit = 5
# To use the old cyrus deliver program you have to set:
#mailbox_transport = cyrus
#fallback_transport = lmtp:unix:/var/lib/imap/socket/lmtp
#luser_relay = $firstname.lastname@example.org
#luser_relay = $email@example.com
#luser_relay = admin+$local
#header_checks = regexp:/etc/postfix/header_checks
# FAST ETRN SERVICE
#fast_flush_domains = $relay_domains
# SHOW SOFTWARE VERSION OR NOT
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
# PARALLEL DELIVERY TO THE SAME DESTINATION
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
# DEBUGGING CONTROL
debug_peer_level = 2
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
xxgdb $daemon_directory/$process_name $process_id & sleep 5
# debugger_command =
# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
# >$config_directory/$process_name.$process_id.log & sleep 5
# Another possibility is to run gdb under a detached screen session.
# To attach to the screen sesssion, su root and run "screen -r
# <id_string>" where <id_string> uniquely matches one of the detached
# sessions (from "screen -list").
# debugger_command =
# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
# -dmS $process_name gdb $daemon_directory/$process_name
# $process_id & sleep 1
# INSTALL-TIME CONFIGURATION INFORMATION
# The following parameters are used when installing a new Postfix version.
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
sendmail_path = /usr/sbin/sendmail.postfix
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
newaliases_path = /usr/bin/newaliases.postfix
# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
mailq_path = /usr/bin/mailq.postfix
# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
setgid_group = postdrop
# html_directory: The location of the Postfix HTML documentation.
html_directory = no
# manpage_directory: The location of the Postfix on-line manual pages.
manpage_directory = /usr/share/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
sample_directory = /usr/share/doc/postfix-2.3.3/samples
# readme_directory: The location of the Postfix README files.
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
myhostname = webmail2.kyse.us
mynetworks = 127.0.0.0/8
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
smtpd_sasl_local_domain = $myhostname
I can post more of the file contents if there are other files you might need to see.
||3rd January 2007 20:32
Also, I know im getting a little ahead of myself. But is there a webmail program that works with this setup, that will let me have the following conclusion:
I log into webmail using kyse as login name.
I can view firstname.lastname@example.org
email, view email@example.com
l, view firstname.lastname@example.org
||3rd January 2007 21:15
After messing around with some things I got it to say something when I telnet in, but found another problem :/ I have no idea where this protocol mismatch comes from, but will post configs upon request. Heh...
Here's what the telnet session does now.
[root@webmail2 ~]# telnet localhost 22
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
||3rd January 2007 21:44
Port 22 is for ssh communication. If you really want telnet (never do this if your accessing systems on the Internet) then use port 21.
But as you are on a linux box, why not use the 'ssh' client command? It's there or if not, it's easily installed. just type
But you're testing your mail server, right? (just skimming though your posting):o ...
Then you should use
telnet localhost 25
||3rd January 2007 21:53
Aw man, I fooled myself. looks like postfix still isn't working. :(
||3rd January 2007 22:24
Here's the /var/log/maillog
Jan 3 16:18:55 lace postfix/proxymap: fatal: unsupported dictionary type: mysql
Jan 3 16:18:56 lace postfix/master: warning: process /usr/libexec/postfix/proxymap pid 8696 exit status 1
Jan 3 16:18:56 lace postfix/master: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Jan 3 16:18:56 lace postfix/smtpd: warning: premature end-of-input on private/proxymap socket while reading input attribute name
Jan 3 16:18:56 lace postfix/smtpd: warning: private/proxymap socket: service dict_proxy_open: Success
Think that could have something to do with it?
||4th January 2007 01:12
Got some of the warnings gone, still having trouble with this one from my /var/log/maillog file
postfix/smtpd: fatal: unsupported dictionary type: mysql
postfix/master: warning: process /usr/libexec/postfix/smtpd pid 10495 exit status 1
postfix/master: warning: usr/libexec/postfix/smtpd: bad command startup --throttling
||4th January 2007 02:55
Ok, I think I've got why this is happening figured out.
1) when trying to buildrpm, I get the message '-mcpu=' is deprecated. Use '-mtune=' or '-march=' instead.
2) RPM is not placed in /usr/src/redhat/RPMS/i386/ or /usr/src/redhat/RPMS/*/ even..
3) I downloaded the postfix-2.2.8-2.3.i386.rpm and attempted to rpm it and got the following errors: file * from install of postfix-2.2.8-1.2 conflicts with file from package postfix-2.3.3-2
So, 1, postfix wasn't patched due to rpmbuild errors creating no rpm for me to install. And 3, now I can't even install the older postfix cause the newer version is out. Anyone know a way to fix this issue so I can either install the older RPM, or build my new 2.3.3 postfix?
||4th January 2007 04:03
OK falko, check it..
I got it all working, now im trying to edit the database using mysql.
it gives me the same error for editing domains as users but I have users to copy/paste, so here it is:
mysql> INSERT INTO 'users' ('email', 'password', 'quota') VALUES ('email@example.com', ENCRYPT('blah'), 10485760);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''users' ('email', 'password', 'quota') VALUES ('firstname.lastname@example.org', ENCRYPT('blah' at line 1
Any ideas? :P
||4th January 2007 05:12
OK, here's where I'm standing now... hehe..
I can send and receive email to and from the one account I craeted in the databases now. email@example.com
. However if I try to send an email to internal user accounts on the mail server, such as firstname.lastname@example.org
or external email addresses such as email@example.com
, I get undeliverable return messages back to outlook.
What am I missing? :(
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.