Koozali.org: home of the SME Server

mail problem

Offline davidS

  • ****
  • 80
  • +0/-0
mail problem
« on: October 26, 2014, 12:50:34 PM »
hi
i have a problem sending mail to one specific user
there is a few domain name on the server and if i send mail to user1@domain1.com the mail is received fine, but if im sending a mail to user1@domain2.com i recived an error of :
Quote
it was rejected by the server for the recipient domain user1@domain2.com 550 Unable to queue message (5.1.1 <user1@domain2.com> Recipient not found

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: mail problem
« Reply #1 on: October 26, 2014, 05:07:36 PM »
Is "user1" the actual SME username (some users create weird usernames then use an 'alias' to deliver email to different domains)?

Is the email for 'domain2.com' hosted on the SME server, or is that domain configured with 'MailServer' pointing to another server (db domains show domain2.com)?

Is there anything interesting in /var/log/qpsmtpd/current? /var/log/qmail/current?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: mail problem
« Reply #2 on: October 27, 2014, 11:03:08 AM »
are user1, domain1 and domain2 on your SME?

can you please give us some more details to try to understand?

TIA

Offline davidS

  • ****
  • 80
  • +0/-0
Re: mail problem
« Reply #3 on: October 27, 2014, 01:34:20 PM »
hi
ok so user1 and domain1 and 2 are only examples
1. yes the domains are on the sme and i pointed the mx record of the domains to the main domain FQDN of the server
2.the mails are working perfectly only if i send a mail to the username@domain1.com which is the Primary domain name of the server,
   but what i want is to send a mail to user1 with a different domain name that is also on the same sme server but not a primary .
3. the domain2.com is in "Resolve locally" status and the a record of the domain is pointed to sme ip address
4. i checked the log file and all seems to be fine

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail problem
« Reply #4 on: October 27, 2014, 03:54:10 PM »
sibony88

Quote
1. yes the domains are on the sme and i pointed the mx record of the domains to the main domain FQDN of the server
3. the domain2.com is in "Resolve locally" status and the a record of the domain is pointed to sme ip address

I should ask, is your server on a public static IP or a dynamic IP service ?
As you mention "sme ip address", then I assume you have a static IP:

With SME server you do not need MX records.
Just point each FQDN at the SME server public static IP.
If you do insist to create one (or many) MX records, you should point it/them at the public static IP of the SME server.

Unless you have a specific reason for doing so, you should use "Resolve to Internet DNS" or similar name, for your domains.

To have user1@domain1 and user1@domain2 both deliver correctly, you will need to configure Users correctly (ie you cannot have 2 user1) and you need to configure Pseudonyms for each user on each domain, that way domain specific mail will be delivered to the correct user.
Please see the Pseudonyms section in the Manual (& the FAQ) as this has been specifically documented.
ie
pseudonym for joe@domain1 forwards to user joe1
pseudonym for joe@domain2 forwards to user joe2
(in this scenario joe is not a user on your sme server)
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: mail problem
« Reply #5 on: October 27, 2014, 04:13:44 PM »
1. yes the domains are on the sme and i pointed the mx record of the domains to the main domain FQDN of the server


Shouldn't that be that you point EACH mx record of EACH domain to EACH separate FQDN on YOUR server, and not just to the main domain?

Offline davidS

  • ****
  • 80
  • +0/-0
Re: mail problem
« Reply #6 on: October 27, 2014, 05:31:43 PM »
ok thank you janet
with the pseudonym now everything is working.

it's just that without the  pseudonym if i am sending mail to user1@domainname1 or user1@domainname2 or user1@domainname3 the user1 is reciving the mails, but only one username is working only with the primary domain .......that's strange so only for that user i created a pseudonym .

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail problem
« Reply #7 on: October 27, 2014, 06:33:50 PM »
sibony88

Note you cannot have multiple users with the same name of joe (user1), but you can have User accounts for joe1, joe2 , joe3 etc, & the pseudonym joe@domain1, joe@domain2, joe@domain3 forward to them respectively.

I think you need to delete the User account joe and only use that as a pseudonym to forward to User accounts for joe1, joe2, joe3.

Please read the pseudonym chapter carefully again, it is all detailed there, but keep in mind you may have to rethink how you name users ie joe1 instead of joe, mary1 instead of mary etc etc.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.