Problem sending mail exim4 & Orange

If none of the more specific forums is the right place to ask

Problem sending mail exim4 & Orange

Postby _Michel_ » 2020-11-22 14:14

Hello,

I have a small box powered by Debian 10. I use exim4 as MTA. This system is set to install security updates each day via CRON. If an update has been done, it sends me a mail. Well, that was before...

Since roughly June 2020, I didn't receive any mail. After searching the cause, I eventually found out that my ISP (Orange) has blacklisted this sender which is the default one: root@orange.fr.

So, if I type this in name of root:
Code: Select all
echo "test" | mail -s "test" mymail@orange.fr
The mail never reaches my mailbox. However, if I try this, it works:
Code: Select all
echo "test" | mail -s "test" -aFROM:tata@toto.fr mymail@orange.fr


The question is: how to change the default sender for mail or, at least, for CRON?

What I've ever tried:
- Changing the mail domain in /etc/mailname. It doesn't work even after a reboot.
- Setting a rewrite rule for exim4 (adding a file in /etc/exim4/conf.d/rewrite/). This has no effet, but I have to say, I have little to no knowledge how to doing this.

I've also looked at the possibility to set a MAILFROM parameter in CRON. If I believe man 5 CRONTAB, there is no such a parameter.
_Michel_
 
Posts: 5
Joined: 2020-11-22 11:47

Re: Problem sending mail exim4 & Orange

Postby _Michel_ » 2020-11-24 16:42

Nobody knows?
Are there any details missing?
Is it something too complex?
_Michel_
 
Posts: 5
Joined: 2020-11-22 11:47

Re: Problem sending mail exim4 & Orange

Postby reinob » 2020-11-24 19:28

Well the obvious answer is, don't use root@orange.fr as your address, since you are not the owner of orange.fr.

I cannot answer anything about exim, but I'm 100% sure that somewhere in the settings (/etc/exim4) you have defined your domain to be orange.fr.

You could also check (or post here) the contents of /etc/hostname and /etc/hosts.

Somewhere your are "hijacking" orange.fr, and they (rightfully) don't want to let you do that.
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: Problem sending mail exim4 & Orange

Postby _Michel_ » 2020-11-24 19:58

I understand your point, despite my "hijacking" isn't at all wanted.

I reread the exim4 config files and found this line in /ect/exim4/update-exim4.conf.conf: dc_readhost='orange.fr'
So, I changed it and it works! You can't put whatever you want here, but some domains work (at least with mail command).

I expect that mails from CRON will arrive in my mailbox now.

Thank you very much.
_Michel_
 
Posts: 5
Joined: 2020-11-22 11:47

Re: Problem sending mail exim4 & Orange

Postby reinob » 2020-11-25 07:39

_Michel_ wrote:I understand your point, despite my "hijacking" isn't at all wanted.

I reread the exim4 config files and found this line in /ect/exim4/update-exim4.conf.conf: dc_readhost='orange.fr'
So, I changed it and it works! You can't put whatever you want here, but some domains work (at least with mail command).

I expect that mails from CRON will arrive in my mailbox now.

Thank you very much.


In principle you can put whatever you want in dc_readhost (from what I could learn just now), but of course the question is whether you want to do that and/or are allowed. It should be *your* domain.

Maybe you could send as root@orange.fr if you use a relay (smarthost) which lets you do that (from your experience, using orange.fr itself is a no-go :).

But even if it works, you are still faking an address, so you'll run into problems sooner or later. Better use a domain you actually own or are allowed to use (like a dynamic DNS domain or such).
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: Problem sending mail exim4 & Orange

Postby _Michel_ » 2020-11-25 13:03

I can actually put anything in dc_readhost but not all domains allow to reach my mailbox.

I don't care about the sender, I just want to receive these mails. Is it not allowed for someone with no domain to receive some mails from its own machines?

Anyway, I have a dynamic DNS, so I will try to use that as the domain. Thanks for the idea.
_Michel_
 
Posts: 5
Joined: 2020-11-22 11:47

Re: Problem sending mail exim4 & Orange

Postby reinob » 2020-11-25 19:34

_Michel_ wrote:I can actually put anything in dc_readhost but not all domains allow to reach my mailbox.

I don't care about the sender, I just want to receive these mails. Is it not allowed for someone with no domain to receive some mails from its own machines?

Anyway, I have a dynamic DNS, so I will try to use that as the domain. Thanks for the idea.


I don't think I understand you correctly.

If one computer sends an e-mail, in your case using exim as MSA (mail submission agent), then it can either be sent directly to the receiver, at his MTA (message transfer agent), or to an intermediate server (relay, smarthost, whatever you want to call it).

My understanding is that you are using the mail relay of orange.fr, which understandably doesn't want to let you use (spoof) root@orange.fr as your e-mail address.

If you run your own MTA at the receiving side then you can probably configure exim (probably.. I don't know, I use postfix) to directly contact the MTA of the receiver (looking up the corresponding DNS MX record).

This way it is delivered directly, without any intermediate relay, and (as long as you accept anything) e-mails can come from whatever (faked) e-mail address.

Your MTA, your rules. Other's MTAs, their rules.. :)
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: Problem sending mail exim4 & Orange

Postby _Michel_ » 2020-11-26 07:31

I have little knowledge about mail servers. I don't want to set up one because, by using my ISP, I can read my mails from everywhere (not to mention the security reasons if I open a mail server to internet).

The sender root@orange.fr has worked sucessfully for more than one year.

I understand that my ISP has to fight against spammers but I think I ain't the only one who use forged senders, I mean not for evil reasons. So, the only point for me was to change the sender and it's not that easy with exim4.

After different trials, I come to the conclusion that my ISP verifies the existence of the sender domain. If you give an existing domain, even if you don't own it, it relays the mail (except for orange.fr itself where it's seem it's more complicated: verification of the existence of the sender?).

Anyway, I tried my dynamic DNS as domain, as you suggested, and it works. So, I will stick to this. I configured my other machines accordingly (ssmtp is easier to configure by the way).

I hope I won't have any more trouble with my ISP now.

Thanks again.
_Michel_
 
Posts: 5
Joined: 2020-11-22 11:47


Return to General Questions

Who is online

Users browsing this forum: No registered users and 19 guests

fashionable