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
  #11  
Old 22nd March 2010, 03:54
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi SamTzu,

Thanks for the assistance. I will try to check on this and try to increase the mail server's memory allocation in the VM. Not sure if it's OpenVZ or KVM though. Thanks!

Kindly,
DJ
Reply With Quote
Sponsored Links
  #12  
Old 22nd March 2010, 04:42
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by djmixx07 View Post
Hi SamTzu,

Thanks for the assistance. I will try to check on this and try to increase the mail server's memory allocation in the VM. Not sure if it's OpenVZ or KVM though. Thanks!

Kindly,
DJ
Oh SamTzu, its a KVM.
Reply With Quote
  #13  
Old 22nd March 2010, 08:24
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The memory allocation for the mail server VM seems ok. Here is the screenshot.


Here is also the screenshot of the Cluster node where the mail server is located.


Hope this helps.

I am really lost here now on how to solve the problem. Thanks guys for giving some time to help solve it.
Reply With Quote
  #14  
Old 22nd March 2010, 12:26
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Ok, im trying to mess around since i can restore it if i do something awfully wrong. Our previous net admin left an old (maybe obsolete) manual..so I tried some of it. I tried to "apt-get purge postfix", then "apt-get autoremove postfix".

Then I reinstalled it with "apt-get install postfix":
Code:
General type of configuration? <-- Internet Site
Mail name? <-- server1.domainname.com
then did "dpkg-reconfigure postfix":
Code:
General type of configuration? <-- Internet Site
Where should mail for root go <-- [blank]
Mail name? <-- server1.domainname.com
Other destinations to accept mail for? (blank for none) <--
server1.domainname.com, localhost.domainname.com, localhost.localdomain, localhost
Force synchronous updates on mail queue? <-- No
Local networks? <-- 127.0.0.0/8, 124.x.x.0/29
Use procmail for local delivery? <-- Yes
Mailbox size limit <-- 0
Local address extension character? <-- +
Internet protocols to use? <-- all
then:
Code:
postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
postconf -e 'inet_interfaces = all'
echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
The manual said to create the certificates for TLS doing these:
Code:
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024

chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr

openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out
smtpd.crt

openssl rsa -in smtpd.key -out smtpd.key.unencrypted

mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out
cacert.pem -days 3650
then:
Code:
postconf -e 'smtpd_tls_auth_only = no'
postconf -e 'smtp_use_tls = yes'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'
postconf -e 'myhostname = domainname.com'

/etc/init.d/postfix restart

mkdir -p /var/spool/postfix/var/run/saslauthd

/etc/init.d/saslauthd start
Now a problem again arises. The manual said to do "telnet localhost 25", and "ehlo localhost" after it establishes a connection. But I get stuck with telnet having this:
Code:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
I tried to check mail.log and mail.err to find this:

mail.log:
Code:
Mar 22 17:58:23 mail postfix/master[2681]: warning: master_wakeup_timer_event: service pickup(public/pickup): No such file or directory
Mar 22 17:58:57 mail postfix/smtpd[14832]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
Mar 22 17:58:58 mail postfix/master[2681]: warning: process /usr/libexec/postfix/smtpd pid 14832 exit status 1
Mar 22 17:58:58 mail postfix/master[2681]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
mail.err:
Code:
Mar 22 18:16:14 mail postfix/smtpd[15240]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
Here's the current main.cf:
Code:
# 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

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/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

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

myhostname = server1.domainname.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.domainname.com, localhost.domainname.com, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8, 124.x.x.0/29
mailbox_command = procmail -a "$EXTENSION"
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_sasl_authenticated,permit_mynetworks,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_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
Hope this all helps to fix my problem. Thanks Falko and SamTzu for your assistance, you've been great. If I have to reinstall postfix again or restore it again to the point before I did all these, please let me know.

Kindly,
DJ
Reply With Quote
  #15  
Old 23rd March 2010, 18:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Is it possible that there are still some Postfix processes running? What are the outputs of
Code:
netstat -tap
and
Code:
ps aux
?
__________________
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
  #16  
Old 24th March 2010, 05:16
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default Almost done..

Thanks falko,
You're right, that might have been the problem when I uninstalled Postfix; that there are still some Postfix processes running that's why I can't do telnet. Because yesterday I realized that and tried to do a clean uninstall using
Code:
aptitude remove postfix* --purge
which I saw when I was doing some research about the problem with telnet or port 25 being already used.

Doing that suddenly made everything ok with my new installation of postfix. But the next problem was POP3 was offline in ISPConfig and pop3/imap was also missing in "nmap localhost". Found a similar problem in one of your archived forums; and so I reinstalled my Courier using
Code:
apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0
which I found here: http://www.howtoforge.com/perfect-se...-ispconfig2-p4

Everything went ok after that with POP3 and IMAP showing now in my nmap localhost, and POP3 now showing online status in ISPConfig. But here's a new issue that suddenly came up..I ran some test emails using webmail (Roundcube) and Thunderbird. I was able to successfully send out emails but when I reply or send email FROM outside domains like Gmail and Yahoo -- it bounces back. Check the mail log and it shows that it's rejecting/refusing connections from outside the server. Here's the error:
Code:
NOQUEUE: reject: RCPT from mail-pv0-f171.google.com[x.x.x.x]: 554 5.7.1 <emailname@domainname.com>: Relay access denied; from=<djdelossantos@gmail.com> to=<emailname@domainname.com> proto=ESMTP helo=<mail-pv0-f171.google.com>
It also shows this:
Code:
mail postfix/smtpd[20597]: warning: unknown[x.x.x.x]: SASL LOGIN authentication failed: authentication failure
I don't know what next to do, but I'm also doing my research. Thanks Falko for the help. Hope we solve this once and for all.

BTW, here's my postconf -n:
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = sample1.domainname.com, localhost.domainname.com, localhost.localdomain, localhost
myhostname = sample1.domainname.com
mynetworks = 127.0.0.0/8, 124.x.x.0/29
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
Reply With Quote
  #17  
Old 24th March 2010, 13:13
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Falko,
Ok this is what I've done so far from what I have been reading online (specially @Howtoforge.com). The problem with emails sent to me from outside the domain like Gmail, and having the error in my mail log "NOQUEUE: reject: Relay access denied", I think (not sure) has been solved -- but not really. What I did was to add:
Code:
mydestination = /etc/postfix/local-host-names
to my main.cf and restarted postfix.
versus
What I had before which was:
Code:
mydestination = sample1.domainname.com, localhost.domainname.com, localhost.localdomain, localhost
Ok the emails I sent FROM gmail didn't bounce back anymore and I didn't get the "NOQUEUE: reject: Relay access denied" error anymore! Hallelujah!

But the problem is the webmail (Roundcube) and mail client (Thunderbird) is not receiving anything! I don't know if it's stored or got lost somewhere. ..this is kinda frustrating because I thought I got my problem solved once and for all. I hope you guys can help me solve this "new" issue that came up. And I hope my posts has helped anyone in any way. Thanks!

Heres my new mail.log:
Code:
Mar 24 18:57:16 mail postfix/cleanup[17760]: 6CE0C3B013C: message-id=<ac18d1d21003240357x3602905h151a99e66c4cd5e9@mail.gmail.com>
Mar 24 18:57:16 mail postfix/qmgr[15853]: 6CE0C3B013C: from=<djdelossantos@gmail.com>, size=2584, nrcpt=1 (queue active)
Mar 24 18:57:16 mail postfix/pickup[15852]: D9F483B013F: uid=10066 from=<web1_anarciso>
Mar 24 18:57:16 mail postfix/cleanup[17759]: D9F483B013F: message-id=<20100324105716.D9F483B013F@mail.immigration.gov.ph>
Mar 24 18:57:16 mail postfix/qmgr[15853]: D9F483B013F: from=<web1_anarciso@mail.immigration.gov.ph>, size=415, nrcpt=1 (queue active)
Mar 24 18:57:16 mail postfix/local[17779]: D9F483B013F: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.05, delays=0.03/0/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 24 18:57:16 mail postfix/qmgr[15853]: D9F483B013F: removed
Mar 24 18:57:44 mail postfix/local[17813]: 6CE0C3B013C: to=<web1_anarciso@mail.immigration.gov.ph>, orig_to=<anarciso@immigration.gov.ph>, relay=local, delay=28, delays=0.59/0/0/28, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 24 18:57:44 mail postfix/qmgr[15853]: 6CE0C3B013C: removed
Mar 24 18:57:47 mail postfix/smtpd[18133]: disconnect from mail-px0-f176.google.com[209.85.216.176]
Reply With Quote
  #18  
Old 24th March 2010, 15:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Do you use ISPConfig 2? If so, you must also add
Code:
virtual_maps = hash:/etc/postfix/virtusertable
to /etc/postfix/main.cf 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
  #19  
Old 25th March 2010, 04:27
djmixx07 djmixx07 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
Default

That is already in my main.cf falko..but it doesn't show in postconf.

here's my main.cf:
Code:
# 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

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/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

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

myhostname = server1.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names 
relayhost = 
mynetworks = 127.0.0.0/8, 124.6.144.0/29
mailbox_command = procmail -a "$EXTENSION"
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_sasl_authenticated,permit_mynetworks,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_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydomain = mydomain.com
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
and here's my postconf -n:
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = /etc/postfix/local-host-names
mydomain = mydomain.com
myhostname = server1.mydomain.com
mynetworks = 127.0.0.0/8, 124.6.144.0/29
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom

Last edited by djmixx07; 25th March 2010 at 04:30.
Reply With Quote
  #20  
Old 25th March 2010, 19:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Did you configure ISPConfig to use Maildir (Management > Server > Settings > Email)?
__________________
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
Reply

Bookmarks

Tags
bare metal, ispconfig, postfix, proxmox, roundcube

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
Unable to Login to ISPConfig Stewart81 General 11 2nd August 2009 13:13
with ISPConfig, Postfix, and Courier, mail does not send or receive karazy-k Server Operation 15 20th July 2009 06:44
Suddenly can't receive email - please help miguelpinheiro General 7 14th December 2008 19:33
Can't receive email at all (or can't login) djkoelkast Installation/Configuration 2 8th September 2006 15:26
Can Send email but not receive it using sendmail on debian ZeroDni Installation/Configuration 7 25th June 2006 07:04


All times are GMT +2. The time now is 07:58.


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