Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th July 2008, 15:17
Vic Steele Vic Steele is offline
Junior Member
 
Join Date: Jul 2008
Location: Potenza, Italy
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 19th July 2008, 22:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Are there any errors in your mail log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th July 2008, 22:45
Vic Steele Vic Steele is offline
Junior Member
 
Join Date: Jul 2008
Location: Potenza, Italy
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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

Last edited by Vic Steele; 20th July 2008 at 22:51.
Reply With Quote
  #4  
Old 21st July 2008, 17:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Can you post your /etc/postfix/main.cf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 27th July 2008, 21:44
Vic Steele Vic Steele is offline
Junior Member
 
Join Date: Jul 2008
Location: Potenza, Italy
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #6  
Old 28th July 2008, 14:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Vic Steele (29th July 2008)
  #7  
Old 29th July 2008, 00:54
Vic Steele Vic Steele is offline
Junior Member
 
Join Date: Jul 2008
Location: Potenza, Italy
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #8  
Old 24th November 2009, 22:55
Mariusz_S Mariusz_S is offline
Junior Member
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Now it seems to work

You're the boss!!

Now it seems to work

Thank you so much.
Reply With Quote
  #9  
Old 26th November 2009, 13:31
jonasgreatguide jonasgreatguide is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot.
This is very helpful.
Reply With Quote
  #10  
Old 16th November 2010, 14:24
jetfix jetfix is offline
Junior Member
 
Join Date: Nov 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 16:33
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40
Postfix problem: lost connection after CONNECT from unknown fernando_torrez Server Operation 5 30th November 2007 14:17
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 05:45.


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