HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix doesn't connect to telnet (http://www.howtoforge.com/forums/showthread.php?t=25241)

Vic Steele 18th July 2008 15:17

Postfix doesn't connect to telnet
 
Hi all. First of all, thanks to Falko for his tutorials.
I have a system prepared for run as a generic Web Server. I use Debian Etch as OS and I've already installed all things necessaries (Apache Webserver, Php, MySQL, etc...).
All works so good, except Postfix, I don't be succesful to start it.
I follow these two tutorials:
1) The Perfect Setup;
2) Virtual Users And Domains With Postfix, Courier and MySQL.

Following this tutorials, all is ok and I'm able to get all the services started. For example, if I launch /etc/init.d/postfix start, it starts and looks ok.
So it doesn't work, and if I launch "telnet localhost 25", this is the response:
Code:

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.

And nothing else matters.
All the other things in the 2nd tutorial are good and work fine.
I don't know what's wrong. Maybe I failed to write "server1.example.com", I wrote in all "hostname.dyndns.org", where hostname is my real hostname, obviously.
So, what is my wrongs? If necessary, I can post other, for example a configuration file, if you want to take a look.
I repeat: all the processes start good, following the 2nd tutorial I've problems only in the final command, when I must to launch telnet for testing the correct status.

I want to say thanks in advance for your support, and say sorry if my English is not perfect, cause I come from Italy.

falko 19th July 2008 22:14

Are there any errors in your mail log?

Vic Steele 20th July 2008 22:45

On /var/log/mail.log there are many rows like these:

Quote:

Jul 20 22:37:22 fitpc postfix/proxymap[17257]: warning: request for unapproved table: "unix:passwd.byname"
Jul 20 22:37:22 fitpc postfix/proxymap[17257]: warning: to approve this table for proxymap access, list proxy:unix:passwd.byname in main.cf:proxy_read_maps
Jul 20 22:37:22 fitpc postfix/smtpd[17255]: fatal: proxymap service is not configured for table "unix:passwd.byname"
Jul 20 22:37:22 fitpc postfix/proxymap[17257]: warning: request for unapproved table: "mysql:/etc/postfix/mysql-virtual_forwardings.cf"
Jul 20 22:37:22 fitpc postfix/proxymap[17257]: warning: to approve this table for proxymap access, list proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf in main.cf:proxy_read_maps
Jul 20 22:37:22 fitpc postfix/cleanup[17256]: fatal: proxymap service is not configured for table "mysql:/etc/postfix/mysql-virtual_forwardings.cf"
Jul 20 22:37:23 fitpc postfix/master[2487]: warning: process /usr/lib/postfix/smtpd pid 17255 exit status 1
Jul 20 22:37:23 fitpc postfix/master[2487]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Jul 20 22:37:23 fitpc postfix/master[2487]: warning: process /usr/lib/postfix/cleanup pid 17256 exit status 1
Jul 20 22:37:23 fitpc postfix/master[2487]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling

falko 21st July 2008 17:29

Can you post your /etc/postfix/main.cf?

Vic Steele 27th July 2008 21:44

Of course:

Quote:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = "domain.dyndns".org
mydomain = "domain.dyndns".org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = "domain.dyndns".org, localhost."domain.dyndns".org, localhost
relayhost = mail.tin.it
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_logevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/
content_filter = amavis:[127.0.0.1]:10024
mailbox_command = /usr/bin/spamc | procmail -a "$EXTENSION"
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = lists.vicsteele.org
mailman_destination_recipient_limit = 1
virtual_maps = hash:/etc/postfix/virtual
mynetworks_style = host
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
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 =
In "domain.dyndns" there is my real domain name selected on dyndns.org.

falko 28th July 2008 14:55

Please run
Code:

postconf -e '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'
and restart Postfix.

Vic Steele 29th July 2008 00:54

You're the boss! Now it seems to work (it responds to telnet, I must try enough the rest, but that's all I need for now).
Thank you so much.

Mariusz_S 24th November 2009 22:55

Now it seems to work
 
You're the boss!! :)

Now it seems to work

Thank you so much.

jonasgreatguide 26th November 2009 13:31

Thanks a lot.
This is very helpful.

jetfix 16th November 2010 14:24

Can you please help me Falko? I'm playing around this postfix-game along one month ... and can't get it to work correctly!

I can send and receive emails to the world from real linux accounts ... but can't use squirrelmail or use virtual accounts


/var/log/mail.log says:

Nov 16 08:10:54 mail authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',1),'/',SUBSTRING_INDEX(email,'@',1),'/'), "", "", "" FROM users WHERE email = 'ghost@mail.helpdesk.in.ua'
Nov 16 08:10:54 mail authdaemond: zero rows returned
Nov 16 08:10:54 mail authdaemond: no password available to compare
Nov 16 08:10:54 mail authdaemond: authmysql: REJECT - try next module



and my configuration files are these:

/etc/postfix/main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache


myhostname = mail.helpdesk.in.ua
mydomain = helpdesk.in.ua

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.helpdesk.in.ua, helpdesk.in.ua, mail.helpdesk.in.ua
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

tml_directory = /usr/share/doc/postfix/html

virtual_alias_domains =
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_authenable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $vir$
smtpd_sasl_auth_enable = yes

P.S. I'm not using forwarding or quotas ...



/etc/courier/audaemondrc

authmodulelist="authmysql"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=2



/etc/courier/authmysqlrc

MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD :))))))))))
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',1),'/',SUBSTRING_INDEX(email,'@',1),'/')


what else? any ideas? I really don't understand why authdaemond does such a strange SQL query as I posted in the beginning of my reply...


Please help if you will.


All times are GMT +2. The time now is 09:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.