ispCP - Board - Support
when the mail server is out of the box - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: when the mail server is out of the box (/thread-3654.html)



when the mail server is out of the box - tassoman - 07-01-2008 09:03 PM

Hi all, today I've discovered that my ispcp installation cannot send emails to info@mydomain.com because there isn't that mailbox.

I've not created that mailbox because mailing still outside of the ispcp server. MX aren't changed and points to another mailserver.

I've checked also locally with a dns query and MX is correct. I feel like the domain is forced to send mail to himself on localhost without querying the real MX DNS.

Is it? How can i correct this?


RE: when the mail server is out of the box - motokochan - 07-02-2008 01:39 AM

tassoman Wrote:I've checked also locally with a dns query and MX is correct. I feel like the domain is forced to send mail to himself on localhost without querying the real MX DNS.

Is it? How can i correct this?

If the local mail server has the domain as its destination, then it won't try to do a lookup and will deliver locally (or virtually) because it thinks it is responsible for the domain.

You'll need to turn off mail creation, but I'm not near my test box to find the file for you. If no one else posts how, I'll look as soon as I'm back and have it booted.


RE: when the mail server is out of the box - tassoman - 07-02-2008 01:59 AM

I hope wouldn't be a global configuration, because some of other virtual hosts are successfully running postfix flawless. Thank you very much for help, I still waiting.

For now I'm forwarding contact form mails to personal gmail account (and works -_-'')


RE: when the mail server is out of the box - ephigenie - 07-02-2008 07:19 AM

the Problem is the domains map - postfix assumes he's responsible for the domain as long as there's an entry for it in the map. (/etc/postfix/ispcp/domains* )

It doesn't matter if you've no mailboxes defined.
Solution : remove the unwanted domains out of the domains file, ran postmap against the file and put it below the working dir, too so that the next run of ispcp-rqst-mngr doesn't revert your changes.


RE: when the mail server is out of the box - tassoman - 07-02-2008 08:04 AM

Ok. I've added a comment into the rows with outer mailservers, i've refreshed with

Code:
su
cd /etc/postfix
postmap domains
then, restarted postfix and removed the alias i was using to get emergency mails.

Now I've tried to send an email from webform application and it was sent as expected.

Thankz you very much.


RE: when the mail server is out of the box - tassoman - 07-15-2008 11:26 PM

There is a problem while running rqst-mange script.

domains file will be re created. Then your commented domains will be re-enabled. Sad

Looks like a bug.. Better.. A feature request...


RE: when the mail server is out of the box - simple - 07-16-2008 04:00 AM

you have to do the change not only to the life file at /etc/postfix/ispcp/domain but also to the runtime-backup /etc/ispcp/postfix/working/domain - because the ../working/ files will override the existing config with the next change.

greets
Markus


RE: when the mail server is out of the box - bzctoons - 07-31-2008 10:22 AM

tassoman Wrote:Hi all, today I've discovered that my ispcp installation cannot send emails to info@mydomain.com because there isn't that mailbox.

I've not created that mailbox because mailing still outside of the ispcp server. MX aren't changed and points to another mailserver.

I've checked also locally with a dns query and MX is correct. I feel like the domain is forced to send mail to himself on localhost without querying the real MX DNS.

Is it? How can i correct this?

here is a basic situation :
you have a contact form on you web site, which hosted on a ispcp managed system, when the form tries to sed and email, fisrt the DNS resolution may fails, because your local bind server, which is handled by ispcp answer first and returns the local system as MX host.
To solve this, add some remote DNS server before the 127.0.0.1 in /etc/resolf.conf
Next, postfix remains issued : as postfix is handled by ispcp, the domain is defined as virtual, also postfix send the mail locally.
To solve this, you have to update /etc/postfix/ispcp/domains and comments the remote domains, next run postmap to rebuild the db and apply the changes.

Here is attached a script which update postfix automatically,
To install, just upload it the server, chmod it as 755 and run it.
comments are welcome