Author Topic: [Solved] simple mail server  (Read 1982 times)

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
[Solved] simple mail server
« on: September 04, 2013, 06:24:13 am »
running Zentyal 3.

i have mydomain.com
zentyal server has public ip xxx.xxx.xx.xxx
public ip is an A record of mail.mydomain.com
an mx record exists of @ mail.mydomain.com 10 900

on zentyal, the mail server is running
the webmail server is running
incoming, outgoing mail and smtp are all allowed for external and local networks
i can telnet successfully to mail.mydomain.com 25 from external site and get 220 response
company.lan is setup as a virtual domain
mydomain.com is setup as a virtual domain
user Joe has email Joe@company.lan
i can check Zentyal webmail by logging in as Joe@company.lan
i can connect to server with an email client and retrieve Joe@company.lan via pop
i setup Joe@mydomain.com as an alias email in Joe's profile
i email Joe@mydomain.com from external site, but nothing shows up (as i understand, for an alias, you still login using Joe@company.lan credentials)

what am I missing?
« Last Edit: September 05, 2013, 02:26:12 am by zippydan »

christian

  • Guest
Re: simple mail server
« Reply #1 on: September 04, 2013, 06:44:15 am »
I'm not sure I understand 100% of your point (I read your post quite quickly) so pardon me if I'm wrong but is your goal to be able to receive mail sent to joe@mydomain.com in Joe's unique mail box (the one created for joe@company.lan) ?

For what I understand, if you create virtual domain, Zentyal will create (assuming you're using standard mail back-end and not Zarafa) dedicated repository in /var/vmail for this mail domain and mails will be delivered there.

If I'm not wrong in order to achieve what you describe, you should rather add your secondary domain as an alias domain (see external account alias in virtual domain setting section)  8)

Give a try and let us know.

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
Re: simple mail server
« Reply #2 on: September 04, 2013, 11:16:33 am »
then what is the purpose of email aliases under each user profile?

christian

  • Guest
Re: simple mail server
« Reply #3 on: September 04, 2013, 11:41:19 am »
To me, these are 2 different concepts:
- mail alias at account level describes all additional mail addresses that are attached to existing account (meaning all mail sent to any of these addresses will go to main mail address mailbox)
- when you define virtual domain alias, all mail sent to address at either main mail domain or address at any "alias" domain will go to unique mailbox matching address@main domain, without need for additional setting at account level

Still what you did should work too assuming you manually apply setting for each account.
So it depends on what you target (or may understanding is truncated  :-[)

This being said, if it doesn't work, it should be pretty easy to track:
- look at mail.log -> has mail been accepted, then delivered and if yes, where ? (BTW did you ensure there is no "joe" folder in the secondary /var/vmail/domain repository ?

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
Re: simple mail server
« Reply #4 on: September 04, 2013, 11:48:38 am »
in /var/vmail/ i only see /var/vmail/company.lan

there is no /var/vmail/mydomain.com   :(

i guess that is a clue, but i'm not sure what i missed...

christian

  • Guest
Re: simple mail server
« Reply #5 on: September 04, 2013, 11:56:17 am »
So what's about mail you send to alternate address. Is it received at postfix level ? did you look at /var/log/mail.* already ?
grep  ???  ;)

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
Re: simple mail server
« Reply #6 on: September 04, 2013, 04:17:56 pm »
ok much closer now...

i had a tiny error in my MX record ha :p

anyway, in /var/log/mail.log I can now see mail entering for Joe@mydomain.com.  There is still no /var/vmail/mydomain.com, presumably because it looks like the mail gets forwarded directly to Joe@company.lan

the problem is ... when i check my webmail and when i check via pop ... my inbox is still empty!!  where is the mail disappearing to??

here are the relevant lines from the log:

Sep 4 09:54:40 zentyalserver postfix/lmtp[19371]: AC437DAOB71: to=<Joe@company.lan>, orig_to=<Joe@mydomain.com>, realy=127.0.0.1[127.0.0.1]:2003, delay=0.73, delays=0.45/0/0.11/0.17, dsn=2.1.5, status=sent (250 2.1.5 Joe@company.lan Ok)

This looks like success!  Where is my email?

The next line is the last line in the transmission:

Sep 4 09:54:40 zentyalserver postfix/qmgr[3777]: AC437DAOB71: removed

I hope that doesn't mean it is deleting my email :P

That's it!

christian

  • Guest
Re: simple mail server
« Reply #7 on: September 04, 2013, 04:29:22 pm »
So mail is sent... to the right mail address (joe@company.lan)  Good news  ;)
As you can access this mailbox and read mails sent there, this is strange if it is not received...

Did you look at syslog too ? (just in case there is another error somewhere)
Are you using Zarafa too ?

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
Re: simple mail server
« Reply #8 on: September 04, 2013, 06:42:25 pm »
ooooo I did install Zarafra modules, but I didn't set them up yet or "activate" them per se.  That said, I do see all of my virtual domains ALSO defined and "Enabled" under "Groupware", which I think is Zarafra.  I don't know how to check if it is running.

Could Zarafra be stealing my mail and putting it in a different mailbox somewhere?
How do I access that mailbox?
And does that mean I can't use webmail with Zarafra?

:(

EDIT: Ok that was it.  Zarafra was stealing my emails.  I found them all in http://serverip/webaccess.

Thanks so much for your help!
« Last Edit: September 04, 2013, 06:52:00 pm by zippydan »

christian

  • Guest
Re: simple mail server
« Reply #9 on: September 04, 2013, 10:18:39 pm »
I didn't highlight Zarafa first because you wrote that you were receiving and reading mails sent to main mail domain... but given what you explained further, Zarafa was one of the potential reasons  ;)
I love this "2 different mail backend" design  :-X