27 posts / 0 new
Last post
#1 Sat, 07/19/2014 - 07:01
sauron1973

Postfix help

Hi, can someone please help me, as I am at the stage where I am severly pulling my hair out and going round the bend. I have my own vps set up and am trying to create a virtual server and configure the emails so I can access them and send using Thunderbird. I have come from cpanel and so do nut understand postfix and setting it up. I have read the forum and tutorials and am still baffled. I have gone to create a new "website" and am now getting the following message;

Failed to create virtual server : No outgoing address mapping file (sender_canonical_maps) was found in your Postfix configuration

What does this mean and how do I fix this?

Sat, 07/19/2014 - 07:12
Locutus

Did you use the Virtualmin installer script, or some manual/tutorial method? The former is highly recommended, since it will configure all services properly for you. The error you describe should not occur when you use the installer script on a clean OS install.

Sat, 07/19/2014 - 10:01 (Reply to #2)
sauron1973

Hi, yes I used the automated script on a clean install.

Sat, 07/19/2014 - 11:06
andreychek

Howdy,

Hmm, the error that you're getting suggests that something non-default may be enabled.

What is the output of this command:

postconf -n

Also, do you receive any errors if you go into System Settings -> Re-Check Config?

-Eric

Sat, 07/19/2014 - 12:37 (Reply to #4)
sauron1973

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
milter_protocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost, server1.newstarhosting.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:8891,local:/var/run/milter-greylist/milter-greylist.sock
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_milters = inet:localhost:8891,local:/var/run/milter-greylist/milter-greylist.sock
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated check_policy_service unix:/var/spool/postfix/postgrey/socket
smtpd_sasl_auth_enable = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

is the output followed by:

No sender canonical map file for outgoing addresses was found in your Postfix configuration. You should either add the appropriate map to Postfix, or disable this feature in Virtualmin's module config page.

.. your system is not ready for use by Virtualmin.

Sat, 07/19/2014 - 16:30
sauron1973

ok managed to get through the config check by changing;

Also update outgoing addresses for mailboxes? Yes No in the virtualmin config from yes to no.

which has allowed me to create a virtual server.

but thunderbird will still not connect to it

Sun, 07/20/2014 - 07:17
Locutus

Please tell us more details, "will not connect" can have any number of reasons.

E.g., what error does Thunderbird show? What gets recorded in the mail log on your server when you try to connect?

Mon, 07/21/2014 - 11:51
sauron1973

Thunderbird is coming up with;

"Failed to find settings for the email account"

Mon, 07/21/2014 - 11:58
Locutus

Okay, in that case you need to manually configure Thunderbird with the correct settings for your server. (Virtualmin can set up Thunderbird auto-configuration for your sites since a few versions ago though.)

Did you try that? Do you get other errors/problems?

Mon, 07/21/2014 - 12:07
sauron1973

right have turned off the mail client configuration in virtualmin and attempted to manually config using the thunderbird account settings but still getting same error.

Mon, 07/21/2014 - 13:58
Locutus

I'm sorry, I don't really understand the problem. The message that Thunderbird shows just means that it could not auto-configure for your server. It should then let you enter the server details manually. Can you post a screenshot of the error message and the configuration dialog?

Mon, 07/21/2014 - 14:14
sauron1973

do you mean in the log files or thunderbird. Maybe I am manually configuring it wrong but not used to this as always used cpanel before now and everthing just seemed so much more simple and automatic.

Mon, 07/21/2014 - 14:35
Locutus

I'm confused... You were talking about a message Thunderbird showed you, "Failed to find settings for the email account". This means auto-configuration is not available. Thunderbird should then offer you to configure the account manually.

Did you do that? What problems occurred then?

Mon, 07/21/2014 - 15:10
sauron1973

still could not connect to server and root emails not showing up, going to reinstall whole server again.

Thu, 07/24/2014 - 16:33
sauron1973

ok done a brand new install, not touched any postfix configs this time, just left as default, and Thunderbird can now connect kind of.

If I use thunderbird to send an email from my server domain to another email address it get delivered ok, if I then reverse the process and try sending through thunderbird to the domain it doesn't arrive.

Thu, 07/24/2014 - 18:43
andreychek

Howdy,

Hmm, I'm not sure I understand the difference between what is and isn't working... however, whenever there are email problems, one of the best things to do is consult the logs.

You can find the logs in /var/log/maillog, or /var/log/mail.log, depending on your distro.

Using the logs, you can look for errors, as well as determine where exactly it is that the emails are going.

-Eric

Sat, 07/26/2014 - 08:44
sauron1973

hi, right email is setup for user on domain. I use Thunderbird to connect to the server and retrieve any emails sent to the domain and also to send email from the domain ie email@domain.com

Now Thunderbird has connected to my vps and domain.com and is accesing email@domain.com

If I use thunderbird to send a message from email@domain.com it sends it to the server and promptly gets delivered to the intendend person no matter where in the world they are. The problem is if said other person then replies to my sent email it is not arriving at my vps and so thunderbird can't download it and let me read it. have looked in logs but nothing makes sense to me.

So in other words the server isn't accepting incoming mail

Sat, 07/26/2014 - 15:40
Locutus

First step would be to ask the "other person" if they get a non-deliverable message back, saying if and why their mail couldn't be delivered. Usually you have errors like "target server not responding", "mail denied for reason X" or so in that report.

Without any information from the sending side all we could do is guess what could be wrong.

Sat, 07/26/2014 - 16:10
sauron1973

ok, i'll wait for that to come back then repost here.

Sun, 07/27/2014 - 10:28
sauron1973

ok getting the following on returns;

connect to mail.domain.com[...]:25: Connection timed out

Sun, 07/27/2014 - 11:03
sauron1973

ok now tuurns out host is blocking port 25 so where in virtualmin can i change it to something else so mail gets through and outside servers can reach it

Sun, 07/27/2014 - 18:42
tpnsolutions
tpnsolutions's picture

Hi,

You can use port "587" which is an alternate port to 25. It's setup in Virtualmin by default, so there is not configuration changes needed on the server.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 07/28/2014 - 02:29
Locutus

You can use port 587 for your users to deliver mail to be sent outside. But if you want to receive email from the outside for your users, you must use port 25. If your hoster does not open that port for you, your server will not be able to receive email for your users.

Mon, 07/28/2014 - 13:34 (Reply to #23)
tpnsolutions
tpnsolutions's picture

Locutus,

I think his issue is at the ISP level. So he can safely use port 587 to get around ISP's who are now blocking port 25 communication.

Because he'll be using IMAP or POP to download messages, he just needs 587 to handle the sending of email through his ISP.

Again, I don't think his server provider is blocking port 25, this would be insane and I'd instruct him to switch providers if this was the case.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 07/28/2014 - 16:40
sauron1973

This is sorted it turns out they were blocking port 25 but this has now been opened up for me so I can receive emails.

Mon, 07/28/2014 - 16:48
Locutus

But as far as I understood he's trying to receive a mail from the outside on his server. And that only works on port 25, since other servers always try to deliver mail via port 25. There's no way to tell them to use a different port for your server.

Mon, 07/28/2014 - 16:50 (Reply to #26)
tpnsolutions
tpnsolutions's picture

Locutus,

You're right, my bad.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked