Current time: 11-27-2024, 07:48 AM Hello There, Guest! (LoginRegister)


Post Reply 
when the mail server is out of the box
Author Message
tassoman Offline
Junior Member
*

Posts: 15
Joined: May 2008
Reputation: 0
Post: #1
when the mail server is out of the box
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?
(This post was last modified: 07-01-2008 09:04 PM by tassoman.)
07-01-2008 09:03 PM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #2
RE: when the mail server is out of the box
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.
(This post was last modified: 07-02-2008 01:40 AM by motokochan.)
07-02-2008 01:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tassoman Offline
Junior Member
*

Posts: 15
Joined: May 2008
Reputation: 0
Post: #3
RE: when the mail server is out of the box
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 -_-'')
(This post was last modified: 07-02-2008 02:04 AM by tassoman.)
07-02-2008 01:59 AM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #4
RE: when the mail server is out of the box
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.
07-02-2008 07:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tassoman Offline
Junior Member
*

Posts: 15
Joined: May 2008
Reputation: 0
Post: #5
RE: when the mail server is out of the box
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.
(This post was last modified: 07-02-2008 08:05 AM by tassoman.)
07-02-2008 08:04 AM
Find all posts by this user Quote this message in a reply
tassoman Offline
Junior Member
*

Posts: 15
Joined: May 2008
Reputation: 0
Post: #6
RE: when the mail server is out of the box
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...
07-15-2008 11:26 PM
Find all posts by this user Quote this message in a reply
simple Offline
Junior Member
**
Graph Team

Posts: 143
Joined: Dec 2006
Reputation: 0
Post: #7
RE: when the mail server is out of the box
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
(This post was last modified: 07-16-2008 04:01 AM by simple.)
07-16-2008 04:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
bzctoons Offline


Posts: 2
Joined: Nov 2007
Reputation: 0
Post: #8
RE: when the mail server is out of the box
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


Attached File(s)
.txt  ispcp-fix-postfix-domains.sh.txt (Size: 2.72 KB / Downloads: 20)
(This post was last modified: 07-31-2008 10:25 AM by bzctoons.)
07-31-2008 10:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)