Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: Michail Pappas on May 12, 2017, 01:34:19 PM
-
I created a SME server some years ago having a hostname of host.domainA. This is a system in server-only mode, with the sole purpose of acting as a mail server (plus webmail). No proxying, ldap, samba. Just local accounts on it.
This was not a problem, but with the advent of DMARC, my system sends reports for DMARC activity as admin@domainA. Can I set it to send DMARC reports (and all other SME-related mails for that purpose) as admin@domainB?
This is a production system and of course I'll take a VM snapshot before doing so, but still I have to know what might be the downfalls here.
Thanks in advance for any info provided.
-
(bump)
Someone perhaps fellas? Is my request perhaps too naive or is more info needed on my part?
-
I'd think you could do
db domains delprop domainA SystemPrimaryDomain
db domains setprop domainB SystemPrimaryDomain yes
signal-event post-upgrade; signal-event reboot
-
Thanks Dan. Do you foresee any issues in doing so? It would be nice if one of the resident experts could green light this. Like I said, I have backups of the entire VM, but even so I could lose mails perhaps, before taking notice that something went wrong.
-
I don't foresee any issues, but I've never tried it. I can't recall that I've seen the question before.
-
Michail Pappas
You can safely change the domain name of your sme server (& many other configuration too) & data (including emails) does not get lost.
-
Apologies for delaying to get back to you.
In the "problem" description I failed to include a critical piece of information: the hostname is currently hostname.domainA and it has to remain like that, for a number of reasons:
* I have SSL certificates in place for this hostname.domainA
* My MX records for domainB indicate that the mail server is hostname.domainA! (yes, I know it is strange, there were and still are a number of reasons for doing so).
* Hosts connecting securely over S/POP, S/IMAP and secure SMTP should still continue to use hostname.domainA for e-mail purposes (no grunt regarding different certificates etc).
With these in mind, is it still ok to go ahead and do the commands proposed by Dan?
-
Went ahead and tried to see what would happen. Effectively, doing the afore-mentioned commands deleted domainB entirely. That is, db domains show, depicted only domainA alone (even though I had set domainB as SystemPrimaryDomain).
For some reason though, this change did not affect DKIM for domainB. That is, even though it was not listed with db domains show, sent mail was succesfully signed with the DKIM key. Which is somewhat logical, since both domains share the same DKIM key...
At this point I am not sure whether I should open a bug: the reason is that I am not sure, in turn, if the following should have done what I intended in the first place:
db domains delprop domainA SystemPrimaryDomain
db domains setprop domainB SystemPrimaryDomain yes
signal-event post-upgrade; signal-event reboot
Any advice will be appreciated.
-
<offtopic>As to the why I am trying to do this, the reason is the following: the newly generated DMARC reports are sent with a sender address of admin@domainA instead of admin@domainB, resulting errors from the recipient domains. Which is logical since domainA has no MX records, whereas domainB does... So, I would be content if I could simply change the sender of DMARC reports from admin@domainA to admin@domainB.
<Some minutes later>
It was quite easy, creating a template. Will post things later, for whoever needs this.
</offtopic>
-
<Some minutes later>
It was quite easy, creating a template. Will post things later, for whoever needs this.
</offtopic>
config setprop qpsmtpd DMARCReportEmail admin@domainB DMARCContactInfo 'http://site.domainB/'
mkdir -p /etc/e-smith/templates-custom/etc/mail-dmarc.ini
cp /etc/e-smith/templates/etc/mail-dmarc.ini/100organization /etc/e-smith/templates-custom/etc/mail-dmarc.ini
sed -i 's/^domain.*= .*/domain = domainB/' 100organization
signal-event email-update
Not pretty, but did the job for me.