Koozali.org formerly Contribs.org

Local Domains and smtp

Local Domains and smtp
« on: August 22, 2017, 03:39:41 PM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #1 on: August 23, 2017, 12:37:22 AM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

It is bad policy to name server/domain in the form mydomain.local &/or piler.mydomain.local

You should use mydomain.com or piler.mydomain.com ie the real externally resolvable domain URL for your domain.
That way when mail is sent from your server, external mail servers can validate against the sending server for your "real" domain name, whereas they cannot validate mydomain.local or piler.mydomain.local (as it is a non resolvable URL on the Internet).

The setting for
DNS-Server is local
just allows that mydomain.local to resolve locally, but it will still NOT resolve externally (publicly).

You can safely change the server domain name in the admin console (log in at command line as admin, then select Configure this server).

As well you will need to have external DNS records published that point mydomain.com and pilar.mydomain.com to your sme server static IP.

Obviously replace mydomain.com with your real URL.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Local Domains and smtp
« Reply #2 on: August 23, 2017, 07:48:24 AM »
Hi Janet,
thanks for your reply. Maybe i did not clarify the problem correctly.

I do not want the mail-archive be visible from the outside. All local mail should be routed only locally. All domains end in .local and this is wanted. I fetch mails from the internet via get mail. After that, all emails are only handled inside the local network. So i do not want the servers be reachable from the outside.

I just want SME-Server send the mail locally to a local Server.
Any further hints?

Best regards
Andreas

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #3 on: August 23, 2017, 09:17:51 AM »
oegeeks/Andreas

Is that IP ie
piler.mydomain.local, eg. 192.168.100.222
on the same LAN IP range as your main sme server ?
What is the LAN IP for mydomain.local ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Local Domains and smtp
« Reply #4 on: August 23, 2017, 09:43:16 AM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

IIUC, you've 2 servers on the same lan and with the same domain.. and you're trying to send an email from (let's say) sme.mydomain.local to piler.mydomain.local, right?

if so, and IMO, you've to create a domain in sme like piler.mydomain.local and follow this FAQ:
https://wiki.contribs.org/SME_Server:Documentation:FAQ:Section04#Deliver_email_for_one_domain_to_an_internal_or_external_mail_server

if not, please give us as may details as you can about your setup, thank you
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Re: Local Domains and smtp
« Reply #5 on: August 23, 2017, 11:08:33 AM »
Hi Stefano,
you are right. I have this kind of local setup.
I followed the instructions you provided, but some strange thing is going on.
The local piler.mydomain.local has an ip x.x.x.228. This ip is in the Hostname and Adresses section.
Also the db domains setprop test.com MailServer a.b.c.d with a.b.c.d as x.x.x.228.

But if i ping piler.mydomain.local i get the ip address of the SME-Server, which has also the domain mydomain.local.

Do i miss something else?
Best regards
Andreas

Re: Local Domains and smtp
« Reply #6 on: August 23, 2017, 11:10:00 AM »
I forgot to mention:

all entries made by hand regarding piler.mydomain.local have the form x.x.x.228 and not of the server, which is x.x.x.221.

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Local Domains and smtp
« Reply #7 on: August 23, 2017, 11:16:42 AM »
remove piler.mydomain.local from hostname and addresses list
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Local Domains and smtp
« Reply #8 on: August 23, 2017, 11:17:50 AM »
all the emails must be sent to account@piler.mydomain.local (which likely is not what you want I guess)
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Re: Local Domains and smtp
« Reply #9 on: August 23, 2017, 12:02:55 PM »
all the emails must be sent to account@piler.mydomain.local (which likely is not what you want I guess)

In fact, piler is a mail-Archive system. I configured all mail-users so every mail that gets processed will be copied to archive@piler.mydomain.local.

But only copies not the original. But at the moment, no email reaches archives@piler.mydomain.local.

But thanks for all the very useful hints.
Andreas


Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #10 on: August 23, 2017, 12:22:53 PM »
Andreas

Did you delete the entry for pilar.mydomain.local from Hostnames & addresses panel ?
If not, then do so.
Then the commands you should issue are:

db domains setprop pilar.mydomain.local MailServer 192.168.100.228
signal-event email-update

Please check that the archive server is configured to receive mail & test it by manually sending an email from your main server using Webmail.

Was this functionality working previously ?
How is the archive server configured, server only mode ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Local Domains and smtp
« Reply #11 on: August 23, 2017, 12:47:29 PM »
Was this functionality working previously ?
How is the archive server configured, server only mode ?

Hi Stefano,
it was not working previously. The server is not a typical mailserver, but an email-archiv system, see http://www.mailpiler.org. So it just should receive emails on one email-adress: archive@piler.mydomain.local.

I deleted the Hostname-Entry, but there is still a reminiscent:
Aktuelle Liste der Hostnamen für piler.mydomain.local.
Hostname   IP-Adresse    Ethernet-Adresse   
sbs.piler.mydomain.local   Self   x.x.x.221   

If i ping piler.mydomain.com, it still gives x.x.x.221   

I could not test the automatic settings yet, because no new email arrived now. But the manual setting seems to work. Hopefully the problem is solved now.

Thanks for all the helpful response.
regards
Andreas       

Re: Local Domains and smtp
« Reply #12 on: October 11, 2017, 02:15:26 PM »
Wondered if you managed to get this going? I am in the same position as you, virtually to the letter, with a domain ending in .local

Regards Paul.
Infamy, Infamy, they all have it in for me!

Re: Local Domains and smtp
« Reply #13 on: October 11, 2017, 07:49:46 PM »
Wondered if you managed to get this going? I am in the same position as you, virtually to the letter, with a domain ending in .local

Regards Paul.

Hi Paul,
unfortunately i did not have the time to look into the problem deeper. As so far, no mail is sent automatically. Piler archives manually sent emails via a mail client, but not from smeserver. So i think it is a smeserver problem.

Maybe some guru could shed a light, when we provide appropriate information. To the gurus: Please tell us which info you need.
Best regards
Andreas

Re: Local Domains and smtp
« Reply #14 on: October 13, 2017, 12:08:31 PM »
I am hardly the most proficient with SME, but this problem we are having is well and truly beyond me.

I have followed the instructions, and removed the host as suggested, but I seem to be getting a bounce from the ISP's mail server? Which figures I suppose as I have the outgoing mail server set to them. So how now would I tell SME that I wish email delivered to the archive@archive.dc.local ?

Really appreciate some help from much brainier than I on this :-) GDPR is looming and could do with this in place.

Paul.
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #15 on: October 13, 2017, 01:30:15 PM »
I'm just wondering if this is to do with your configuration of piler.

You have got to break this down into little chunks and check each one methodically.

Remember that SME has its own mail transport system. I am not sure how you have integrated Piler with that. However....

I guess the first test would be to remove/disable Piler and leave the server with a stock mail system and one user/pseudonym for 'archive'. Set the sending server to forward a copy of all mail for an existing user to that address archive@piler.somedomain (you can do that in the server-manager)

Then check your logs to see where mail is going. Is it a DNS issue or a mail transport issue? Is it the sending server that is the issue, or the receiving server?

Once you have that little barrel of laughs sorted and mail is flowing, you can then start looking at how you integrate Pller into SME.

Piler runs its own SMTP server so I would imagine you will either have to disable the internal SME mail servver, or reconfigure it somehow (they suggest pointing it to listen only on 127.0.0.1 and then have Piler listen on Port 25 via ethx)

If Piler is the only mail server and the Piler server is in server/gateway configuration you would need to add a config 'service' for Piler with TCPPort 25 which will open the firewall. It may require a lot more than that though.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Local Domains and smtp
« Reply #16 on: October 13, 2017, 02:30:00 PM »
Thanks ReetP

The SME server is fine, works perfectly, and has done for quite a while.

The problem is that the SME sends email out to the ISP's mail server, who of course then reject it as the email is to archive@archive.dc.local (The piler server)
What I suppose I need is a way to send directly to the piler server, from the SME, without leaving the local network. Think that is what I am after. Then I believe it would deliver ok.

Piler has a mail server, but it is not designed to replace SME's mail system, just simply receive email and archive it.

Regards Paul.
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #17 on: October 13, 2017, 03:19:05 PM »
Thanks ReetP

The SME server is fine, works perfectly, and has done for quite a while.

I think we are going to get confused with naming here.... I presume you refer above to your main mail server, not Piler ?


Quote
The problem is that the SME sends email out to the ISP's mail server, who of course then reject it as the email is to archive@archive.dc.local (The piler server)

And if that is the case then you have reached the root cause of your problem I think. Your main server should be sending this to the Piler server, not your ISP.

Quote
What I suppose I need is a way to send directly to the piler server, from the SME, without leaving the local network. Think that is what I am after. Then I believe it would deliver ok.

Yup - you have got it in one.

Quote
Piler has a mail server, but it is not designed to replace SME's mail system, just simply receive email and archive it.

As far as I can see, amongst the other stuff it does, Piler IS a mail server first and foremost - that's how it receives mail ! The archiving stuff is just fancy stuff bolted on.

See : http://www.mailpiler.org/wiki/current:installation

Quote
Configure your mail server to forward a copy of each email it receives or sends to piler

To archive emails, piler must receive them somehow. So you have to configure your mail server to send a copy of each received emails to piler via smtp. Since piler is actually an SMTP server, you should not put postfix, exim, … on the archive itself. If you need it for some reason, then put it to 127.0.0.1:25/tcp, and set the listen_addr variable in piler.conf to listen on eth0 or similar.

So it isn't just as simple as replacing SMEs mail system. Piler runs on the same port as the SME mail server. That can't easily happen.

So, you need to:

Configure your main SME server to copy all mail to your Piler server - both Received and Sent. That will take a few tricks in SME to mangle but should be possible.

Configure your Piler SME server to disable or reconfigure it's own mail server, and use Piler itself as a mail server to receive mail and then archive it.

I hope that is reasonably clear !
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Local Domains and smtp
« Reply #18 on: October 13, 2017, 03:56:17 PM »
Truly excellent help, thank you.

However I shall get back on to the guy that wrote Piler, as he intimated it was just a matter of forwarding a copy of the email to Piler? from each mailbox. I am not too keen on messing with a stable SME, and just assumed that I could just forward the piler directly from each user. But SME mailserver is sending to the ISP, and ignoring the fact it is a local server, locally! If that makes sense. My understanding here is that any .local will be bounced if attempted to be sent out. So how can I force it to delivery .local, directly to the piler server?

Sorry if I am being dumb, frustrating when I do not understand.

Regards Paul
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #19 on: October 13, 2017, 06:21:25 PM »
Hold on - I think you need to take a step back here.

Can you just confirm - you are trying to run two separate machines ?

One is a stock SME which handles your normal mail.

One is 'something else' (tell us what distro) plus Piler.

Can you explain simply and clearly exactly what you have got in the way of setup please? What mode are the servers ? What do you have in the way of firewall/router so we get an idea.

Remember - it is all in front of you, not us, so you need to be our eyeballs and tell us EXACTLY what you have there.

Once we know all that we can test sending mails to Piler to make sure it receives them etc, and then configure SME.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #20 on: October 13, 2017, 09:16:40 PM »
Drifting

Add archive.dc.local to the sme server Hostnames & Addresses panel in sme server.

Then run the command
db domains setprop archive.dc.local MailServer xxx.xx.x.xx
signal-event email-update

Where xxx is the LAN IP of the mail archive server.
This IP should be reachable from the sme server (ie networking issue) ideally on the same LAN IP range as your sme server.

Also it is generally speaking better to use real donain names that resolve to avoid unforseen & unexpected issues with mail server filtering & challenge tests etc etc etc.

Test by logging into webmail on your sme server & manually send an email to archive@archive.de.local
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Local Domains and smtp
« Reply #21 on: October 16, 2017, 06:58:44 PM »
Hold on - I think you need to take a step back here.

Can you just confirm - you are trying to run two separate machines ?


One is a stock SME which handles your normal mail.
Correct 9.2

One is 'something else' (tell us what distro) plus Piler.
Centos with Piler

Can you explain simply and clearly exactly what you have got in the way of setup please? What mode are the servers ? What do you have in the way of firewall/router so we get an idea.

SME is in server-gateway
Centos is single IP fixed, on local lan.

Remember - it is all in front of you, not us, so you need to be our eyeballs and tell us EXACTLY what you have there.

Once we know all that we can test sending mails to Piler to make sure it receives them etc, and then configure SME.


I can send to the piler test user fine piler@dc.co.uk (Which is on the SME server) but when it forwards to archive@archive.dc.local
Even if I send a message to just piler from the admin account,the mail gets to the piler account fine, but bounced back via isp and never reached the piler. Which I can understand as it is not a proper domain, and the ISP's DNS is quite rightfully bouncing it.

Does that make any sense? I know what the problem is, the .local, but I would rather not make this server visible to the internet.

Regards Paul
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #22 on: October 16, 2017, 08:07:52 PM »
I think you tried to reply with your setup but it is buried in my quotrd post ? Please learn to quote properly (use preview)

So I think you mean:

SME in server-gateway handling mail

Plain CentOS, version unknown, with piler installed

Correct ?

Do you have any other mail services running on the CentOS box?

Receiving mail on piler@dc.co.uk is no great surprise. SME would know what to do with it if it receives addressed like that.

How have you setup SME to forward all your mail? (Both incoming and sent)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Local Domains and smtp
« Reply #23 on: October 17, 2017, 11:49:44 AM »
I think you tried to reply with your setup but it is buried in my quotrd post ? Please learn to quote properly (use preview)

So I think you mean:

SME in server-gateway handling mail

Plain CentOS, version unknown, with piler installed

Do you have any other mail services running on the CentOS box?

Receiving mail on piler@dc.co.uk is no great surprise. SME would know what to do with it if it receives addressed like that.

How have you setup SME to forward all your mail? (Both incoming and sent)

Correct, SME is the mail server.

Centos version is :- CentOS Linux release 7.4.1708 (Core)
as for mail servers, I believe it has it's own in piler, but it is not configured for anything other than pilers tasks.

Finally yes, SME is sending email to the ISP's mail server. And use SMTP push to receive it.

Sorry about the quote, was in a rush and did not pay full attention to the posting.

Paul.
ps Janet, have not tried your solution yet, hoping to work on this some more this week.
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #24 on: October 17, 2017, 02:19:21 PM »
Correct, SME is the mail server.

OK.

Quote
Centos version is :- CentOS Linux release 7.4.1708 (Core)

OK. What host and domain have you set on this machine ? (just to confirm)

Quote
as for mail servers, I believe it has it's own in piler, but it is not configured for anything other than pilers tasks.

Think you are mixing your metaphors here. Remember piler IS a mail server in its own right. I wanted to know if you have any OTHER mail services running on this machine eg postfix, qmail/qpsmtpd etc ? As I mentioned, if you have another system it will get in a fight with piler, so even if SME sends mail correctly to the piler server, it may not get received correctly. So you have GOT to get this end sorted and know what you are doing with it.

Quote
Finally yes, SME is sending email to the ISP's mail server. And use SMTP push to receive it.

So your SME server is configure to use a your ISP as a smarthost, correct ?

OK, you need to do a few things as far as I can see.

First send a copy of all emails (both inbound and outbound) to a single account on SME e.g. piler@dc.co.uk (see below - you may be better accepting/creating the default account 'maillog')

https://wiki.contribs.org/Email#Keep_a_copy_of_all_emails

Code: [Select]
config setprop qpsmtpd Bcc enabled BccMode bcc
signal-event email-update

That will use the default user 'maillog'. You seem to be able to override that with:

Code: [Select]
config setprop qpsmtpd BccUser piler
signal-event email-update

See notes below - YMMV....

Then in server-manager set that account to forward all email to archive@piler.mydomain.local

Or at the CLI:

Code: [Select]
db accounts setprop piler EmailForward forward ForwardAddress archive@piler.mydomain.local
signal-event user-modify piler


Now you need to tell SME Server where that domain resides as per janets suggestion (Where xxx is the LAN IP of the piler archive server.)

Code: [Select]
db domains setprop piler.mydomain.local MailServer x.x.x.x
signal-event email-update

So all mail gets bcc'd to pller@dc.co.uk which then forwards it to archive@piler.mydomain.local

That *should* sort it out. However, you must make sure that the piler CentOS 7 server is correctly configured.....

Quote
Sorry about the quote, was in a rush and did not pay full attention to the posting.

NP - it just confuses things....

---------

For reference....

If that lot works then it should become a wiki page - I had to amend the wiki to find the BccUser bit as it mentions creating a maillog user (which is the db default) but didn't mention that you could modify it - I found that by grepping the templates. (my 'bold' below for emphasis).

However, I am not sure that will work everywhere as there might be some hard coded stuff (I can't easily tell):

[root@test e-smith]# grep -rn maillog *
db/configuration/defaults/qpsmtpd/BccUser:1:maillog
locale/sv/etc/e-smith/web/functions/qmailanalog:4:   <trans>Analys av mailloggar</trans>
locale/sv/etc/e-smith/web/functions/qmailanalog:84:   <trans>Analys av mailloggar</trans>
templates/home/httpd/html/horde/imp/config/conf.php/280Other:2:$conf['maillog']['use_maillog'] = true;
templates/home/httpd/html/horde/imp/config/prefs.php/040use_maillog:1://040use_maillog
templates/home/httpd/html/horde/imp/config/prefs.php/040use_maillog:2:if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) \{
templates/etc/rsyslog.conf/00filenames:7:    $maillog = "/var/log/maillog";
templates/etc/rsyslog.conf/60mail:4:mail.*                     -{ "${maillog}" }
web/functions/user-email:871:    print $q->p ('Enable archiving of email to and from the server to the user maillog [which must exist],<br>


[root@test e-smith]# grep -rn BccUser *
templates/var/service/qpsmtpd/config/plugins/13bcc:3:     my $user = $qpsmtpd{BccUser} || '';
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Local Domains and smtp
« Reply #25 on: October 24, 2017, 01:54:18 PM »
Hi both.

Have followed both your instructions to the letter, and it seems that the email is still being routed out of the SME mailserver to the ISP smarthost.

I did keep the default name of maillog, and created a user with that name. I can now see all the email flowing through that, but it is still being bounced as below. If there is anything I can do to help you to help me, then just ask!

Hi. This is the qmail-send program at dc.local.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<archive@archive.dc.local>:
212.*.*.*  does not like recipient.
Remote host said: 518 5.1.2 <archive@archive.dc.local>: Recipient address rejected: Domain not found
Giving up on 212.*.*.*

There is a lot more info, but this contains to many valid email addresses and IPs to put up on here. Happy to send it via personal message.

Paul.
« Last Edit: October 24, 2017, 04:56:49 PM by Drifting »
Infamy, Infamy, they all have it in for me!

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #26 on: October 24, 2017, 03:46:06 PM »
Ahhhhh. Just had thought. Something small but not insignificant that I missed

Quote
email is still being routed out of the SME mailserver to the ISP smarthost

So SME is not making the decision on where to send mail - it just blindly forwards to all to your smarthost. Which clearly knows nothing about your local piler server.

First test is disable sending via smarthost - I'm pretty sure it will then work.

If that is the case then I am not sure exactly how to fix this - it really needs something in your sending mail config to tell SME to send all mail to the ISP EXCEPT for mail to a particular domain.

Can't see how to do that at the minute.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #27 on: October 24, 2017, 08:04:25 PM »
Drifting

Quote
Have followed both your instructions to the letter, and it seems that the email is still being routed out of the SME mailserver to the ISP smarthost.

Your requirement is a standard function of SME server so it should not be difficult to get it working.

I note you have NOT been forthcoming with answers to various questions so you make this procedure more difficult for us & yourself.
eg where is the mail server hosting archive.dc.local located, locally on a LAN or remotely ?
If local, is this IP actually accessible on the network from the SME server ie in the same IP range ?
Can you successfully ping archive.dc.local & the piler server LAN IP from the SME server command line ?

Please advise what this IP is 212.*.*.* so we can test it, is it local or remote, is it publicly accessible if remote ?

What underlying operating system software is this piler server running ?

I note also that your error response refers to dc.local rather than archive.dc.local
ie
"Hi. This is the qmail-send program at dc.local."
Can you explain why that is so ?
Is the piler server domain name dc.local or archive.dc.local ?

Before going further, you probably should undo or remove or delete previous changes made to your system trying to get this to work.
You are following 2 peoples advices so it can get confusing & things can clash.


Now my apologies, there is an error in my earlier advice.
Rather than adding archive.dc.local to the Hostnames & Addresses panel it should be added to the Domains panel in server manager
Please remove it from the Hostnames panel before proceeding
ie then
Open Server manager, Domains panel
Create archive.dc.local
Select Primary site for the i-bay setting (this does not matter much as the archive.dc.local domain site (on SME server) is only accessible locally from your SME server)
Select Resolve locally for the Domain DNS servers field, rather than Internet DNS servers

This will make SME server receptive to email sent to archive.dc.local

Note you will need to add a user named archive to the Server manager User panel


At this point you should be able to send an email message to archive@archive.dc.local using the SME server webmail system,
or using a LAN workstation connected to SME server using an email client that uses SME server as the smtp server.
It should arrive in the archive users mail box on SME server.

If the above test is OK,

Then run the command
db domains setprop archive.dc.local MailServer 212.*.*.*
signal-event email-update

Where 212.*.*.* is the LAN IP or remote IP of the mail server hosting archive.dc.local
If the archive.dc.local mail server is remotely located then this IP must be publicly accessible & resolvable

Please advise what this IP is 212.*.*.* so we can test it ?

Please provide answers.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Online ReetP

  • *
  • 1,494
Re: Local Domains and smtp
« Reply #28 on: October 24, 2017, 08:43:59 PM »
From what I can see the archiver is a stock centos box on his local lan.

The central issue is how to get SME to send a copy of every mail, both incoming and outgoing, to that local archive box.

Every attempt ended with all mail getting sent to his smarthost, including the copy mails destined for the local archiver box.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Local Domains and smtp
« Reply #29 on: October 25, 2017, 12:44:18 PM »
Drifting

Your requirement is a standard function of SME server so it should not be difficult to get it working.

I note you have NOT been forthcoming with answers to various questions so you make this procedure more difficult for us & yourself.
eg where is the mail server hosting archive.dc.local located, locally on a LAN or remotely ?
If local, is this IP actually accessible on the network from the SME server ie in the same IP range ?
Can you successfully ping archive.dc.local & the piler server LAN IP from the SME server command line ?

Please advise what this IP is 212.*.*.* so we can test it, is it local or remote, is it publicly accessible if remote ?

Sorry was not trying to be obtuse, just sometimes it rather goes above my head. As for the 212.*.*.* that is the ISP's mail server, the piler server is on the local lan with the SME server.

Quote
What underlying operating system software is this piler server running ?
Centos 7
Quote

I note also that your error response refers to dc.local rather than archive.dc.local
ie
"Hi. This is the qmail-send program at dc.local."
Can you explain why that is so ?
Is the piler server domain name dc.local or archive.dc.local ?
The SME server is dc01.dc.local, with dc01 being the server name, and followed that with the piler server, archive.dc.local
Quote
Before going further, you probably should undo or remove or delete previous changes made to your system trying to get this to work.
You are following 2 peoples advices so it can get confusing & things can clash.
Ok, happy to do that, but how do I change the commands I typed in? where I was forwarding etc?

Quote
Now my apologies, there is an error in my earlier advice.
Rather than adding archive.dc.local to the Hostnames & Addresses panel it should be added to the Domains panel in server manager
Please remove it from the Hostnames panel before proceeding
ie then
Open Server manager, Domains panel
Create archive.dc.local
Select Primary site for the i-bay setting (this does not matter much as the archive.dc.local domain site (on SME server) is only accessible locally from your SME server)
Select Resolve locally for the Domain DNS servers field, rather than Internet DNS servers

This will make SME server receptive to email sent to archive.dc.local

Note you will need to add a user named archive to the Server manager User panel
Not need to apologise, I appreciate your valuable help and time. Do you still want me to undo all the changes? or try the above first? and the user to receive email on the piler server is called archive@archive.dc.local (The user and the server name are the same)
I did this earlier and did manage to resolve the name of the network, since removed on advice from this thread.
Futher I created a user called maillog as advised, and all the email to that account on the sme is forward to archive@archive.dc.local

Quote
At this point you should be able to send an email message to archive@archive.dc.local using the SME server webmail system,
or using a LAN workstation connected to SME server using an email client that uses SME server as the smtp server.
It should arrive in the archive users mail box on SME server.

Not tried this yet, but will give it a go later today

Quote
If the above test is OK,

Then run the command
db domains setprop archive.dc.local MailServer 212.*.*.*
signal-event email-update

Where 212.*.*.* is the LAN IP or remote IP of the mail server hosting archive.dc.local
If the archive.dc.local mail server is remotely located then this IP must be publicly accessible & resolvable
SME is on 10.0.0.2 dc01.dc.local, archive.dc.local 10.0.0.7 and no, we do not want it resolvable remotely, this is purely for internal use only.

Quote
Please advise what this IP is 212.*.*.* so we can test it ?

as above, the ISP's mail server smarthost



Hopefully that makes more sense. Will try and get the other suggestions tried this evening. Will report back accordingly.

Regards Paul.
Infamy, Infamy, they all have it in for me!

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #30 on: October 25, 2017, 12:53:49 PM »
The central issue is how to get SME to send a copy of every mail, both incoming and outgoing, to that local archive box.
Every attempt ended with all mail getting sent to his smarthost, including the copy mails destined for the local archiver box.

But the command
db domains setprop archive.dc.local MailServer 212.*.*.*
tells the SME server mail system to forward all mail processing for the domain
archive.dc.local
to the server at 212.*.*.*

This should be all that is necessary.
It's not a hard thing to do, I have done it before & it works fine.
I believe Gordon Rowell added this functionality many years ago.

AFAICT Drifting probably has some resolution issues on his network, the pilar server is not being seen by the SME server (my guess).
SME server usually acts as the gateway, so all mail is processed by SME server in a typical LAN.
If you want certain mail for a certain domain to be processed by another server, the steps I outlined are the way to do it, including how the other domain is configured on the SME server.

It would be good if Drifting answered the various questions posed as the answers are pertinent.



Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #31 on: October 25, 2017, 01:01:42 PM »
Drifting

So you are using the wrong IP in the MailServer command

Try

db domains setprop archive.dc.local MailServer 10.0.0.7
signal-event email-update

Mail for the domain archive.dc.local should then be forwarded to the piler server that is on your LAN

You still need to remove the Hostname entry for archive.dc.local in SME server manager
and add archive.dc.local in the Domains panel on SME server, configured as I suggested before
& (I think) add the archive user in SME server manager User panel
so that the email address archive@archive.dc.local will resolve
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Local Domains and smtp
« Reply #32 on: October 25, 2017, 01:11:28 PM »
Drifting

So you are using the wrong IP in the MailServer command

Try

db domains setprop archive.dc.local MailServer 10.0.0.7
signal-event email-update

Mail for the domain archive.dc.local should then be forwarded to the piler server that is on your LAN

You still need to remove the Hostname entry for archive.dc.local in SME server manager
and add archive.dc.local in the Domains panel on SME server, configured as I suggested before
& (I think) add the archive user in SME server manager User panel
so that the email address archive@archive.dc.local will resolve

Actually I must have been on a good day, I understood that part, and did in fact put in the right address, which was 10.0.0.7 as explained before.
Trying to type this on my phone is not fun, but I will try your suggestions as soon as I can and report back.

Regards Paul.
Infamy, Infamy, they all have it in for me!

Re: Local Domains and smtp
« Reply #33 on: November 16, 2017, 01:25:20 PM »
Hi

Just a quick update. Mail seems to be flowing into the archiver, however I believe the web interface on the piler (archive) server requires it to resolve as archive.dc.local, so I can login as such but then it does nothing.

With the settings that are suggested, archive.dc.local now resolves to the SME server, and a ping responds with the SME servers address. Sorry getting a bit confused with the changes that were suggested. Have I done something wrong? or was this a solution to the mail not being bounced?

Regards Paul.
Infamy, Infamy, they all have it in for me!

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #34 on: November 17, 2017, 03:37:16 AM »
Drifting

Your SME server receives all mail for all domains it supports, in effect it is the mail gateway.
The piler archive mail is forwarded on to the piler archive mail server for further processing, rather than being processed & delivered by SME mail server.

You cannot have two mail servers responding to the same domain name, it won't work or results will be inconsistent.

So it is correct that archive.dc.local resolves to the SME server, and correct that a ping responds with the SME servers address, as that's how it is set up.

If you want to access the archive mail sever web interface directly then use the piler server LAN IP, or you could rearrange your config so that the web requests resolve to archive.dc.local, but didn't you say earlier that you did not want archive.dc.local exposed to Internet.

You could add a www setting in the Hostnames panel on SME & point it at the piler server eg www.archive.dc.local, that will possibly achieve what you want
ie I assume you want LAN access only via web interface to archive.dc.local
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Local Domains and smtp
« Reply #35 on: December 06, 2017, 02:20:34 PM »
Hi all.

Just to let you know I have given up on this, had too many other issues with the way it was working.

So now the burning questions of the day, how to I put things back? Am I correct in thinking that I should remove the achive,dc.local under domains, and also remove the "config setprop qpsmtpd Bcc enabled BccMode bcc
signal-event email-update"

Do I assume you just change enabled to disabled? Did a brief look at the docs but could not see a reference to it, not being lazy, just got really poor eyesight. Takes me ages to find anything!

Are there any other items from what was suggested that I should remove?

Regards Paul
Infamy, Infamy, they all have it in for me!

Offline janet

  • ****
  • 4,666
Re: Local Domains and smtp
« Reply #36 on: December 15, 2017, 10:53:00 PM »
« Last Edit: December 15, 2017, 10:55:57 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.