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 7th October 2005, 16:01
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Below is what my main.cf looks like.

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

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

myhostname = mail.mcrirents.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.mcrirents.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
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_tlc = yes
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 $virtu
al_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relo
cated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:{127.0.0.1}:10024
receive_override_options = no_address_mappings
~

I had my host create the DNS entries for me. They created the host and mx records as follows:
mail.mcrirents.com -->> 141.150.xx.xxx
10 mail.mcrirents.com

Do I need to create any other hosts?
Reply With Quote
Sponsored Links
  #12  
Old 7th October 2005, 16:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

When did they create the DNS records? It might take up to 72 hours until all name servers know about the new entries.
__________________
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
  #13  
Old 7th October 2005, 16:33
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

About 3 days now.

I have configure Debian with private settings:

Ip: 192.168.0.xxx
Netmask: 255.255.255.0
Gateway: 192.168.0.x
Dns: 192.168.0.xx

I'm Natting through the router and have 141.150.xx.xxx going to 192.168.0.xxx. I've opened ports 80, 25 and 110 on this ip. Is this correct?

Also, when setting up the network, I gave Debian a hostname of mail.mcrirents.com. I also have the same host name in the postfix configuration. Is that correct?

Last edited by Rocky; 7th October 2005 at 16:36.
Reply With Quote
  #14  
Old 7th October 2005, 22:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by Rocky
I'm Natting through the router and have 141.150.xx.xxx going to 192.168.0.xxx. I've opened ports 80, 25 and 110 on this ip. Is this correct?
Yes.

Quote:
Originally Posted by Rocky
Also, when setting up the network, I gave Debian a hostname of mail.mcrirents.com. I also have the same host name in the postfix configuration. Is that correct?
Yes.

I think the problem is the DNS server you're using on your Debian box (192.168.0.xx). Can you try and put other nameservers into /etc/resolv.conf? E.g. 193.174.32.18 and 145.253.2.11.
__________________
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
  #15  
Old 8th October 2005, 05:42
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Well Falko, I have some good news. After doing a complete re-installation and using your guide, paying very close attention, I was able to sucessfully set up the Debain Sarge Postfix mail system.
I am now able to pop3 into my account with success. The emails are scanned for spam, as well as viruses, before they are received. However, I have one little issue. When I try to send emails out of the pop account, it gives me the following error:

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'malli@computerrents.com'. Subject 'test', Account: 'mail.mcrirents.com', Server: 'mail.mcrirents.com', Protocol: SMTP, Server Response: '554 <malli@computerrents.com>: Relay access denied', Port: 25, Secure(SSL): No, Server Error: 554, Error Number: 0x800CCC79

I had my isp(Verizon) create a PTR record for me today assuming that is the problem. Also, I didn't put any public DNS into the resolve.cf file. Do you think I should? If so, should I use my ISP's DNS servers?

This is how I have it set up using the phpmyadmin interface:
domain --> mcrirents.com
user --> malli@mcrirents.com
Reply With Quote
  #16  
Old 8th October 2005, 11:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by Rocky
The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'malli@computerrents.com'. Subject 'test', Account: 'mail.mcrirents.com', Server: 'mail.mcrirents.com', Protocol: SMTP, Server Response: '554 <malli@computerrents.com>: Relay access denied', Port: 25, Secure(SSL): No, Server Error: 554, Error Number: 0x800CCC79
You have to activate something like "Server needs authentication" in your email client for that account!

Quote:
Originally Posted by Rocky
Also, I didn't put any public DNS into the resolve.cf file. Do you think I should? If so, should I use my ISP's DNS servers?
Yes, use public DNS servers. You can use your ISP's DNS servers or any others (e.g. the ones from my post above).
__________________
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
  #17  
Old 10th October 2005, 14:00
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Ok Falko, I have success. I had a mistake in one of the configuration files. So now that I can send and receive mails, I have a few questions.
Would I be able to train spamassassin? If I needed to allow certain mails that are being blocked as spam, how would I do that?
Also, are file attachments allowed to pass through or are certain exts blocked? How would I be able to allow/disallow them?
And last, is there an interface that I could use to access mails through the web? If yes, can you walk me through setting it up?

I really do appreciate the help and I must add that this tutorial was one of the easiest for me to use so far.

Thanks Falko!!

Last edited by Rocky; 10th October 2005 at 14:03.
Reply With Quote
  #18  
Old 10th October 2005, 16:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by Rocky
Would I be able to train spamassassin?
Yes, there's a program called sa-learn that you can run per cron job. See
Code:
man sa-learn
to find out how to use it.

Quote:
Originally Posted by Rocky
If I needed to allow certain mails that are being blocked as spam, how would I do that?
You can create a whitelist. Have a look at the original file /etc/amavis/amavisd.conf, I think it is described there.

Quote:
Originally Posted by Rocky
Also, are file attachments allowed to pass through or are certain exts blocked? How would I be able to allow/disallow them?
Have a look at the Anomy-Sanitizer: http://mailtools.anomy.net/

Quote:
Originally Posted by Rocky
And last, is there an interface that I could use to access mails through the web?
There are 3 good ones I know of: Squirrelmail (http://www.squirrelmail.org/), Uebimiau (http://www.uebimiau.org/) and Horde/IMP (http://www.horde.org/imp/).
__________________
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 11th August 2006, 14:42
povilas povilas is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Rocky
Below is what my mail.log file looks like as of Oct 7, 05 at 8:37am

Oct 7 08:50:50 mail postfix/smtp[4785]: fatal: valid hostname or network address required in SMTP server description: {127.0.
0.1}:10024
had the same problem.

check
hostname -f

and in case add by
hostname -F /etc/hostname

Also, you should properly configure your dns server.
Reply With Quote
  #20  
Old 11th March 2008, 08:27
Contivity Contivity is offline
Junior Member
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I'm wondering if it's possible to create virtual maps so that people inside the Exchange environment can use it to. For example I have domain.com and I want sales@domain.com to go to john@domain.com, doe@domain.com, and jane@domain.com.

I have successfully create a virtual map to map these users and external email addresses can send to sales@domain.com and get forwarded to these 3 people. However if john@domain.com sends to sales@domain.com, it gets NDR saying that sales@domain.com is not accessible.

How can I force Exchange (I'm on Exchange 2003) to send the e-mails to the postfix server under the following condition:
1. No contacts needs to be created on Exchange server pointing to alternate domain name that points to the postfix server
2. MAPI connection still used instead of SMTP
3. No distribution group needs to be created on the Exchange server making redundant entry of the virtual map

In other words is it possible to force a transport from the MAPI connection to send everything to postfix if no local user is available? if yes, how?
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


All times are GMT +2. The time now is 11:22.


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