SOGo Postfix Address Translation

,

NethServer Version: 7.2.1511 (rc2)
Module: Postfix

After an update, i guess around 08.11. cause the config files are with that date, i am not able to sent emails from the mailserver. I got the invalid DNS MX or A/AAAA resource record error cause the used email adress is the local domain xxx@xxx.lan . in the past it works, after the update not. i thought it is possible to tell postfix to you the normal mail domain to send emails but dont get the settings. any ideas for that?

1 Like

Could you attach any relevant message in /var/log/maillog ?

Nov 16 09:05:45 sbs postfix/smtpd[17439]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 Ok: queued as 10DA840499EA9; from=xxx@xxx.lan to=xxx@xxx.org proto=ESMTP helo=
Nov 16 09:05:45 sbs postfix/smtp[17445]: 10DA840499EA9: to=xxx@xxx.org, relay=smtp.1und1.de[212.227.15.167]:587, delay=0.49, delays=0.07/0.07/0.32/0.02, dsn=5.0.0, status=bounced (host smtp.1und1.de[212.227.15.167] said: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command))

What is your mail user agent (MUA)? SOGo? Roundcube? Other?

Did you set the smarthost?

The MAIL FROM field is set by the mail user agent, and should not contain an internal DNS name otherwise it can be refused by other mail servers (MTA) and the recipient cannot send back his reply!

Latest updates didn’t change anything in Postfix configuration. Could it be possible that “smtp.1und1.de” changed its policy?

Mail User Agent is SOGo. And yes, smarthost is set.
This is what i mean, it works for around a month or so and today i
notice that it stops. The Policy from 1und1 was not changed, i had
the Problem also as i setup the Netserver 7.2 RC2. So you think it
is again a Problem with SOGo?

SOGo is limited on setting the sender (mail from) address. Perhaps we should map the internal mail domain with a public DNS-resolvable name.

so at SOGo there is no point to change only the mail domain? just for sending the mail? cause mapping the internal domain with a public dns is not possible i guess it is a typical intern domain name with .lan at the end.

Next days I’m going to write down a custom-template to fix this scenario!

3 Likes

if i change the domain name in the /etc/sogo/sogo.conf to the regular domain name (extern) everything works fine. but this sogo.conf will be overwritten next time from the e-smith templates, come ultima time. for me is not clear the change in the regular sogo.conf.template in /etc/e-smith/templates/etc/sogo/sogo.conf.

1 Like

Please share here your tweak! We can make a custom template of it to persist it over RPM updates!

1 Like

i change in the /etc/sogo/sogo.conf

/* 20 Mail */
SOGoDraftsFolderName = “Drafts”;
SOGoSentFolderName = “Sent”;
SOGoTrashFolderName = “Trash”;
SOGoJunkFolderName = “Junk”;
SOGoIMAPServer = “localhost”;
SOGoSieveServer = “sieve://localhost:4190”;
SOGoSMTPServer = “127.0.0.1:587”;
> SOGoMailDomain = “realdomain.de”; here change into real domain name
SOGoMailingMechanism = “smtp”;
NGImap4ConnectionStringSeparator = “/”;

After that sogo send mail like before

1 Like

Excellent! Please follow the instructions for custom templates here:

http://docs.nethserver.org/projects/nethserver-devel/en/v7rc/templates.html#local-site-overrides-templates-custom-and-templates-user-custom

You need a custom template that overrides this fragment:

/etc/e-smith/templates/etc/sogo/sogo.conf/20mail

For any doubt, please ask!

i figured out how to change the templates but not sure about the entry cause there is written
SOGoMailDomain = “{$DomainName || ‘localdomain’}”;

so if i change only the entry ‘localdomain’ you think it is okay?

No, it would be ignored. Write it down literally:

SOGoMailDomain = "realdomain.de";

so in the end it must be look like
SOGoMailDomain = “realdomain.de”; ?

1 Like

HI all,

AFAIK SOGo can not handle mail-aliasses, handling of default mail-domain could be imporved.
Problem/challenge is to pick the right one from the domains database where the actual mail-domains are stored. It can have multiple entry’s and we do not assign a default prop. I thought about choosing the first one as this is a better gues as the domain name stored in the general db.

1 Like

In the SOGo documentation there are some settings implying some tweaking is possible. :slight_smile:
Until now did not get a result we like, maybe an other SOGo (power) user can shed a light on this?

SOGoMailCustomFromEnabled

Parameter used to allow or not users to specify custom “From” addresses from SOGo’s preferences panel.
Defaults to NO when unset.

SOGoMailCustomFullName

The string to use as full name when composing an email, if SOGoMailCustomFromEnabled is set in the user’s domain defaults.
When unset, the full name specified in the user sources for the user is used instead.

SOGoMailCustomEmail

The string to use as email address when composing an email, if SOGoMailCustomFromEnabled is set in the user’s domain defaults. When unset, the email specified in the user sources for the user is used instead.

I’m working on an enhancement where the primary domain record can be removed. Could it help in this scenario?