I'm Trying to send mail from my RedHat 5.9 machine. so a command look like this:

echo "Test mail" | mail -s "test" tgc-olga@technion.ac.il

will end up me getting an error mail look like this:

> The original message was received at Wed, 10 Jan 2018 09:00:00 +0200
> from localhost.localdomain []
>    ----- The following addresses had permanent fatal errors -----
> <tgc-olga@technion.ac.il>
>     (reason: 553 #5.1.8 Domain of sender address <root@ilmn-qm.bi.technion.ac.il> does not exist)
>    ----- Transcript of session follows ----- ... while talking to
> technion-ac-il.mail.protection.outlook.com.:
> >>> MAIL From:<root@ilmn-qm.bi.technion.ac.il> SIZE=619 <<< 553 #5.1.8 Domain of sender address <root@ilmn-qm.bi.technion.ac.il> does not
> exist 501 5.6.0 Data format error

looking around the web make me found similar solution here so i edit /etc/mail/domaintable file:

*.technion.ac.il  technion.ac.il

than i tried within the folder:

service sendmail restart

** EDIT **

> dig technion.ac.il
> ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.2 <<>> technion.ac.il ;;
> global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode:
> QUERY, status: NOERROR, id: 9356 ;; flags: qr rd ra; QUERY: 1, ANSWER:
> ;; QUESTION SECTION: ;technion.ac.il.                        IN      A
> ;; ANSWER SECTION: technion.ac.il.         2854    IN      A      
> ;; AUTHORITY SECTION: il.                     101370  IN      NS     
> nsa.ns.il. il.                     101370  IN      NS      nsb.ns.il.
> il.                     101370  IN      NS      nse.ns.il. il.        
> 101370  IN      NS      ilns.ilan.net.il. il.                    
> 101370  IN      NS      lookup.iucc.ac.il. il.                    
> 101370  IN      NS      sns-pb.isc.org. il.                     101370
> IN      NS      ns1.ns.il. il.                     101370  IN      NS 
> ns2.ns.il. il.                     101370  IN      NS      ns3.ns.il.
> ;; Query time: 1 msec ;; SERVER: ;; WHEN: Wed
> Jan 10 08:51:05 2018 ;; MSG SIZE  rcvd: 241

but problem isn't solved. Any help will be appreciated.

  • 1
    Did you copy the error message from a terminal or did you manually write it here ? If you copied it from a terminal, it seems you misstyped your server host : it says techion.ac.il instead of technion.ac.il. If this is not the problem can you add to your question the result of the following command : dig technion.ac.il ? – user264413 Jan 9 '18 at 13:21
  • this site editor interpretated some of the signs as special characters and changed the context. i edited the question adding the dig comment results. – hamaor Jan 10 '18 at 7:07

Yes, technion.ac.il does exist, but according to public DNS at least, ilmn-qm.bi.technion.ac.il does not exist.

$ dig +noauth ilmn-qm.bi.technion.ac.il ANY
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61930
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096

Also, the bi.technion.ac.il domain has a SPF record saying that only senders listed in the SPF record for spf.protection.outlook.com are valid for this domain. So even if you registered ilmn-qm.bi.technion.ac.il to public DNS, it would probably fail a SPF check.

$ dig +noauth bi.technion.ac.il ANY
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4367
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 13, ADDITIONAL: 15

; EDNS: version: 0, flags:; udp: 4096
bi.technion.ac.il.      2468    IN      TXT     "EqkKAGrhnUwdxbT3qyzejnNnmW2bVdbFOhszJabIWkp/qtPbYYWRMF1M1WF2KoMBOn5y6bdiYpdrfDLKi7ZHDQ=="
bi.technion.ac.il.      2468    IN      TXT     "v=spf1 include:spf.protection.outlook.com -all"
bi.technion.ac.il.      2468    IN      MX      0 bi-technion-ac-il.mail.protection.outlook.com.
bi.technion.ac.il.      2468    IN      MX      20 mrelay.technion.ac.il.
bi.technion.ac.il.      2468    IN      MX      10 nlbex.technion.ac.il.

Editing your /etc/mail/domaintable won't help: the error happens when your system is talking to the recipient's mail server (which, according to public DNS MX records, is technion-ac-il.mail.protection.outlook.com), which consults the DNS and sees that the sender address does not exist in the public DNS. As a result, it assumes that your server is either a malware-ridden host or an amateur spammer, and so it will reject the email.

| improve this answer | |
  • for more background, Technion.ac.il is the university domain wheres ilmn-qm.bi.technion.ac.il is a local server under a firewall which cannot be recognized outside the Technion network. my /etc/aliases file contains: # Person who should get root's mail root: hamaor@technion.ac.il which is me. so i get notified by mail for every failed delivery of mail. means that "Technion.ac.il" can be getting mails from this server. thoughts? – hamaor Jan 10 '18 at 13:13
  • There might be one specific SMTP gateway server you're supposed to use for sending all outgoing mail from any servers under a firewall. That gateway server would be configured to accept mail from the firewalled systems. From your viewpoint, this would be called a "smart" delivery host, or "smarthost" for short. The best solution would be to contact your university's mail administrators: they should know the details of the uni's mail system configuration, and would be able to give you the correct settings to use. – telcoM Jan 10 '18 at 13:32
  • The uni's mail system is very likely configured to accept mail from anyone "outside" to valid email accounts on the "inside", but only from valid senders to the "outside". For some reason, it recognizes hamaor@technion.ac.il as valid, but not tgc-olga@technion.ac.il. As a result, your emails to the second address get subjected to stricter sender checks. – telcoM Jan 10 '18 at 13:36
  • half problem solved by designating the machine to our local DNS server and allowed to be looked up by the wan. nonetheless, i still can't send mails anyone but my own mail. – hamaor Jan 16 '18 at 7:12
  • That's probably the SPF record in action: the uni's mail system may have special allowance for the bi.technion.ac.il network, but the rest of the world just sees the SPF record, notes that your server (or the NAT address its traffic enters the internet from) is not among the list of valid senders, and rejects your mails. – telcoM Jan 16 '18 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.