LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2019, 05:36 AM   #1
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Rep: Reputation: Disabled
Sendmail: Relaying denied


Hello,

I would like to receive mails sent from any address to yugiohjcj@aaa.org in the yugiohjcj local mailbox (yugiohjcj@localhost).
So, I open the port 25/tcp (smtp) with iptables.
Then, I configure sendmail.
Then, I run sendmail.

Now, through a mail client (Mozilla Thunderbird), I send an e-mail from yugiohjcj@bbb.org to yugiohjcj@aaa.org.

On the server side, I can read in the log:
Code:
$ tail -f /var/log/maillog
Mar 30 11:14:55 server sm-mta[2148]: x2UAEsvx002148: ruleset=check_rcpt, arg1=<yugiohjcj@aaa.org>, relay=smtp5-g21.free.fr [212.27.42.5], reject=550 5.7.1 <yugiohjcj@aaa.org>... Relaying denied
Mar 30 11:14:55 server sm-mta[2148]: x2UAEsvx002148: from=<yugiohjcj@bbb.org>, size=670, class=0, nrcpts=0, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=smtp5-g21.free.fr [212.27.42.5]
Here is the sendmail configuration:
Code:
$ cat sendmail.mc
OSTYPE(`linux')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db',`relaytofulladdress')
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')
MAILER(`local')
MAILER(`smtp')
$ cat /etc/mail/access
From:yugiohjcj@bbb.org RELAY
To:yugiohjcj@aaa.org RELAY
$ cat /etc/mail/virtusertable
yugiohjcj@aaa.org yugiohjcj@localhost
What am I doing wrong please?

Thank you.
Best regards.
 
Old 03-30-2019, 10:28 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
$ tail -f /var/log/maillog
Mar 30 11:14:55 server sm-mta[2148]: x2UAEsvx002148: ruleset=check_rcpt, arg1=<yugiohjcj@aaa.org>, relay=smtp5-g21.free.fr [212.27.42.5], reject=550 5.7.1 <yugiohjcj@aaa.org>... Relaying denied
Mar 30 11:14:55 server sm-mta[2148]: x2UAEsvx002148: from=<yugiohjcj@bbb.org>, size=670, class=0, nrcpts=0, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=smtp5-g21.free.fr [212.27.42.5]
Is that mtp5-g21.free.fr [212.27.42.5] your sendmail server address?
Since emailing depends on dns, you must setup the MX record of the aaa.ord domain pointing to your server.

If you want to exchange emails just locally, you may add the 2 domains in /etc/mail/local-host-names and restart sendmail

Regards
 
Old 03-30-2019, 10:48 PM   #3
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Is that mtp5-g21.free.fr [212.27.42.5] your sendmail server address?
No, mtp5-g21.free.fr [212.27.42.5] is not my sendmail address.
This address depends on the From address used in the mail client.
Example: If I send an e-mail from yugiohjcj@ccc.org (instead of from yugiohjcj@bbb.org) to yugiohjcj@aaa.org, on the server side I can read in the log:
Code:
Mar 31 05:18:31 server sm-mta[4953]: x2V3IU2N004953: ruleset=check_rcpt, arg1=<yugiohjcj@aaa.org>, relay=sonic310-12.consmr.mail.ir2.yahoo.com [77.238.177.33], reject=550 5.7.1 <yugiohjcj@aaa.org>... Relaying denied
Mar 31 05:18:31 server sm-mta[4953]: x2V3IU2N004953: from=<yugiohjcj@ccc.org>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=sonic310-12.consmr.mail.ir2.yahoo.com [77.238.177.33]
Quote:
Originally Posted by bathory View Post
Since emailing depends on dns, you must setup the MX record of the aaa.ord domain pointing to your server.
It was not done.
I am using a DNS service provided by Freenom [1].
I can add an MX record through their web page in "Services > My Domains > Manage Domain > Manage Freenom DNS > Modify Records".
There are 5 fields: Name, Type, TTL, Target and Priority.
If I try: Name: <empty>, Type: MX, TTL: 3600, Target: <the IP address of my server> and Priority: 10 I get the following error: "Error occured: Invalid value in dnsrecord".
If I try: Name: aaa.org, Type: MX, TTL: 3600, Target: <the IP address of my server> and Priority: 10 I get the following error: "Error occured: CNAME records should have a name set!".
So, it seems that I can't do it.

Quote:
Originally Posted by bathory View Post
If you want to exchange emails just locally, you may add the 2 domains in /etc/mail/local-host-names and restart sendmail
I do not exchange emails just locally.
Indeed, yugiohjcj@aaa.org and yugiohjcj@bbb.org are not local addresses.

[1] https://www.freenom.com/

Last edited by YuGiOhJCJ; 03-30-2019 at 10:58 PM.
 
Old 03-31-2019, 03:37 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
There are 5 fields: Name, Type, TTL, Target and Priority.
If I try: Name: <empty>, Type: MX, TTL: 3600, Target: <the IP address of my server> and Priority: 10 I get the following error: "Error occured: Invalid value in dnsrecord".
If I try: Name: aaa.org, Type: MX, TTL: 3600, Target: <the IP address of my server> and Priority: 10 I get the following error: "Error occured: CNAME records should have a name set!".
So, it seems that I can't do it.
The MX record haves the following format:
Code:
aaa.org. MX 10 mailserver.aaa.org.
so you need the FQDN (e.g. mailserver.aaa.org) of your mailserver, not its IP address. But of course the FQDN must resolve to the IP of your server.


Quote:
Indeed, yugiohjcj@aaa.org and yugiohjcj@bbb.org are not local addresses.
Huh? Isn't aaa.org your domain?
The MX stuff above is needed in order to receive mail for aaa.org!
 
Old 04-01-2019, 03:58 AM   #5
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
The MX record haves the following format:
Code:
aaa.org. MX 10 mailserver.aaa.org.
so you need the FQDN (e.g. mailserver.aaa.org) of your mailserver, not its IP address. But of course the FQDN must resolve to the IP of your server.
OK, but I think that the web interface of Freenom is not working correctly.
So, I decided to host my own DNS server on my machine so I can configure it easily through the zone file.
I added an MX record.
Here is a part of my zone file:
Code:
$TTL	86400
@	IN	SOA	ns1.aaa.org.	root.aaa.org. (
	20190401
	28800
	14400
	3600000
	86400
)
		IN	NS	ns1
		IN	NS	ns2
		IN	NS	ns1.aaa.org.
		IN	NS	ns2.aaa.org.
		IN	MX	10 mail.aaa.org.

mail		IN	A	<the IP address of my server>
ns1		IN	A	<the IP address of my server>
ns2		IN	A	<the IP address of my server>
aaa.org.	IN      A       <the IP address of my server>
But even with this configuration, I have the same problem:
Code:
Apr  1 10:39:58 server sm-mta[11222]: x318dw1w011222: ruleset=check_rcpt, arg1=<yugiohjcj@aaa.org>, relay=smtp5-g21.free.fr [212.27.42.5], reject=550 5.7.1 <yugiohjcj@aaa.org>... Relaying denied
Apr  1 10:39:58 server sm-mta[11222]: x318dw1w011222: from=<yugiohjcj@bbb.org>, size=670, class=0, nrcpts=0, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=smtp5-g21.free.fr [212.27.42.5]
Quote:
Originally Posted by bathory View Post
Huh? Isn't aaa.org your domain?
The MX stuff above is needed in order to receive mail for aaa.org!
Well, aaa.org is my domain (the one I claimed to Freenom) but it is not what I call my "local" domain (but maybe I am not using the correct words).
I have something that I call the "local" domain corresponding to the machines on my network interface "eth1" 192.168.0.0/24 (it is the private IP address).
I have something that I call the "remote" domain corresponding to the machines on my network interface "eth0" <the IP address of my server>/24 (it is the public IP address).
 
Old 04-01-2019, 05:42 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Well, aaa.org is my domain (the one I claimed to Freenom) but it is not what I call my "local" domain (but maybe I am not using the correct words).
I have something that I call the "local" domain corresponding to the machines on my network interface "eth1" 192.168.0.0/24 (it is the private IP address).
I have something that I call the "remote" domain corresponding to the machines on my network interface "eth0" <the IP address of my server>/24 (it is the public IP address).
I don't get what you mean by that. Is your domain a real one, or one made up?
If I send an email to yugiohjcj@aaa.org, is it going to hit your server?
What do you get if you check your domain here.
 
Old 04-01-2019, 12:35 PM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by bathory View Post
I don't get what you mean by that. Is your domain a real one, or one made up?
If I send an email to yugiohjcj@aaa.org, is it going to hit your server?
What do you get if you check your domain here.
bathory: aaa.org is the domain of the Amateur Astronomers Association of New York. It is registered with GoDaddy and its authoritative name servers are at domaincontrol.com. All of its mx records point to google.

YuGiOhJCJ: We certainly understand why you'd want to obfuscate your domain name, but you need to tell us that's what you're doing. The advice given will be different.
If aaa.org is, in fact, your real domain name, then understand that you can't just start up and use a new name server for it...changes must be made at the authoritative name server for the domain.

bathory: The errors look to me like the OP is attempting to deliver the email to the remote servers directly from his server rather than via smtp. I don't speak sendmail, but the "relay not allowed" errors appear to be from free.fr and yahoo.com. Maybe?

YuGiOhJCJ: Please use the site bathory linked to, or whois, to determine the authoritative name server for your actual domain name, then confirm here that that's where you've made the changes. It would be most unusual for the authoritative name servers for your domain to be on your server.
 
Old 04-01-2019, 01:31 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
@scasey
Quote:
bathory: aaa.org is the domain of the Amateur Astronomers Association of New York. It is registered with GoDaddy and its authoritative name servers are at domaincontrol.com. All of its mx records point to google.
I didn't know there was actually a real aaa.org domain, but anyway I'm sure it was used by OP in order to hide the actual domain (he /she also used bbb.org and ccc.org)


Quote:
bathory: The errors look to me like the OP is attempting to deliver the email to the remote servers directly from his server rather than via smtp. I don't speak sendmail, but the "relay not allowed" errors appear to be from free.fr and yahoo.com. Maybe?
These errors mean that there is email sent from free.fr and yahoo.com to yugiohjcj@aaa.org that is rejected by his/her mailserver, because it's not the MX record of the "aaa.org" domain.
 
1 members found this post helpful.
Old 04-01-2019, 02:38 PM   #9
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by bathory View Post
@scasey

I didn't know there was actually a real aaa.org domain, but anyway I'm sure it was used by OP in order to hide the actual domain (he /she also used bbb.org and ccc.org)
That's what I think, too. My point, to the OP, is that they can't just make up a name server for their domain; they need to use the name server of the domain (the authoritative name server). I know that you know that. So, if they're not going to share the real domain name, they need to at least confirm to us that they are modifying the authoritative name server.
Quote:
Originally Posted by bathory View Post
These errors mean that there is email sent from free.fr and yahoo.com to yugiohjcj@aaa.org that is rejected by his/her mailserver, because it's not the MX record of the "aaa.org" domain.
You are without a doubt the go-to person for this stuff, in my opinion...and I agree.
I got confused by the myriad obfuscations. They do say they're sending To: their domain. My mistake.
 
Old 04-05-2019, 03:49 AM   #10
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
I don't get what you mean by that. Is your domain a real one, or one made up?
If I send an email to yugiohjcj@aaa.org, is it going to hit your server?
What do you get if you check your domain here.
If you send an email to yugiohjcj@aaa.org, I will not receive the email because in this forum thread I replaced with "aaa.org" the real domain I claimed to my domain provider (Freenom).
But if you replace "aaa.org" with the real one, yes I will receive it.
I continue to use "aaa.org" here in this forum thead instead of the real one but of course when I test, I use the real one.

I checked my aaa.org domain on https://intodns.com/ and the result is :
- lot of "pass" status (green color) https://intodns.com/static/images/pass.gif
- 5 "info" status (blue color) https://intodns.com/static/images/info.gif
- 4 "warning" status (yellow color) https://intodns.com/static/images/warn.gif
- 1 "error" status (red color) https://intodns.com/static/images/error.gif

For warnings, here is the list:
- Different subnets, WARNING: Not all of your nameservers are in different subnets
- Different autonomous systems, WARNING: Single point of failure
- SOA RETRY, Your SOA RETRY value is: 14400. That is NOT OK
- SOA EXPIRE, Your SOA EXPIRE number is: 3600000. That is NOT OK
For errors, here is the list:
- ERROR: I could not get any A records for www.aaa.org!

But I guess that the most important is the MX category: Everything is "pass" or "info".
- "Your MX records that were reported by your nameservers are: 10 mail.aaa.org <the public IP address of my server>"

Just to try to clarify what I said about "local" domain and "remote" domain, I mean that I already had a private domain that I never claimed to my domain provider.
This private domain was just used locally in my private network to give a name to the machines on my local network.
I run a DNS server since many years but it is only a private service running on the local network interface (the one with the private IP address).
Now, I claimed a domain "aaa.org" to my domain provider and my DNS server is available on the remote network interface (the one with the public IP address).
So, I am using this new "aaa.org" domain for "remote" access to my server but I am still using the old domain for "local" access to my server.
Maybe you will understand better what I mean if I provide this configuration file:
Code:
$ cat /etc/named.conf 
// /etc/named.conf
// Options
options {
	// Bind directory
	directory "/var/named";
	forward first;
        forwarders {
		// ISP DNS
		//212.27.40.240;
		//212.27.40.241;

		// Google DNS
		// 8.8.8.8;

		// OpenNIC DNS
		193.183.98.66;
        };
};
// Zones
zone "." IN {
	type hint;
	file "named.ca";
};
zone "lll.org" IN {
	type master;
	file "lll.org/lll.org.zone";
	allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
	type master;
	file "lll.org/lll.org-rev.zone";
	allow-update { none; };
};
zone "aaa.org" IN {
	type master;
	file "aaa.org/aaa.org.zone";
	allow-update { none; };
};
Anyway, I still have a "Relaying denied" error message in the sendmail log when I send an email to yugiohjcj@aaa.org.
I would like to accept it and receive it in my local mailbox yugiohjcj@localhost.

Last edited by YuGiOhJCJ; 04-05-2019 at 03:56 AM.
 
Old 04-05-2019, 05:22 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Just to try to clarify what I said about "local" domain and "remote" domain, I mean that I already had a private domain that I never claimed to my domain provider.
This private domain was just used locally in my private network to give a name to the machines on my local network.
I run a DNS server since many years but it is only a private service running on the local network interface (the one with the private IP address).
Now, I claimed a domain "aaa.org" to my domain provider and my DNS server is available on the remote network interface (the one with the public IP address).
So, I am using this new "aaa.org" domain for "remote" access to my server but I am still using the old domain for "local" access to my server.
Maybe you will understand better what I mean if I provide this configuration file:
<-snip->
Anyway, I still have a "Relaying denied" error message in the sendmail log when I send an email to yugiohjcj@aaa.org.
I would like to accept it and receive it in my local mailbox yugiohjcj@localhost.
I cannot get exactly what you mean in the lines above, but I guess that you want to send emails inside your LAN to e.g. yugiohjcj@aaa.org where yugiohjcj@aaa.org is the user yugiohjcj in the local box.
If that's the case, then you need to add a MX RR in the dns you're running locally pointing to your box and of course make sure that other hosts in your LAN are using this same dns as a resolver.
 
Old 04-05-2019, 09:44 AM   #12
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
I cannot get exactly what you mean in the lines above, but I guess that you want to send emails inside your LAN to e.g. yugiohjcj@aaa.org where yugiohjcj@aaa.org is the user yugiohjcj in the local box.
If that's the case, then you need to add a MX RR in the dns you're running locally pointing to your box and of course make sure that other hosts in your LAN are using this same dns as a resolver.
No, I just want to send e-mail from addresses like john.doe@aol.com or john.doe@yahoo.com to yugiohjcj@aaa.org.
The domain aaa.org is a domain that I got on Freenom.
But when I check the logs on my sendmail server, I see "Relaying denied".
Of course, I want to receive the mail somewhere to be able to read it, so I think that a simple solution is to receive it in yugiohjcj@localhost (the mailbox of the user yugiohjcj) on the server itself.
If it works, I will then try to receive it at a better address than yugiohjcj@localhost (because I don't want to connect through SSH to my server to check my mails by running the Mutt program).

Last edited by YuGiOhJCJ; 04-05-2019 at 09:51 AM.
 
Old 04-05-2019, 12:45 PM   #13
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Going to try this again:
When you input your domain into https://intodns.com/ Does "Nameserver records returned by the parent servers are:" return the IP address of your server?
 
Old 04-05-2019, 03:16 PM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
No, I just want to send e-mail from addresses like john.doe@aol.com or john.doe@yahoo.com to yugiohjcj@aaa.org.
The domain aaa.org is a domain that I got on Freenom.
But when I check the logs on my sendmail server, I see "Relaying denied".
So to make it clear:
When you send an email from e.g. john.doe@aol.com to yugiohjcj@aaa.org (a user at your real domain), it arrives to your server and it responds with a "Relaying denied".

In this case, you should follow the advise in my 1st answer to your thread, put your domain name in the file /etc/mail/local-host-names and restart sendmail.
Running the following command should tell you if the user is local, or not:
Code:
sendmail -bv yugiohjcj@aaa.org
 
1 members found this post helpful.
Old 04-07-2019, 02:43 AM   #15
YuGiOhJCJ
Member
 
Registered: Apr 2015
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Going to try this again:
When you input your domain into https://intodns.com/ Does "Nameserver records returned by the parent servers are:" return the IP address of your server?
Yes, its public IP address.

Quote:
Originally Posted by bathory View Post
In this case, you should follow the advise in my 1st answer to your thread, put your domain name in the file /etc/mail/local-host-names and restart sendmail.
OK so sendmail will not use the /etc/mail/local-host-names file if I do not change the sendmail.mc configuration file content.
Indeed, I need to add the "use_cw_file" feature.
Here is my new sendmail.mc file:
Code:
$ cat sendmail.mc
OSTYPE(`linux')
FEATURE(`use_cw_file')
MAILER(`local')
MAILER(`smtp')
Now, I edit my /etc/mail/local-host-names file:
Code:
$ cat /etc/mail/local-host-names 
# names of hosts for which we receive email
aaa.org
localhost
Now, through a mail client (Mozilla Thunderbird), I send an e-mail from yugiohjcj@bbb.org to yugiohjcj@aaa.org.
On the server side, I can read in the log:
Code:
Apr  7 10:47:48 server sm-mta[28831]: x378lm8M028831: <yugiohjcj@aaa.org>... User unknown
Apr  7 10:47:48 server sm-mta[28831]: x378lm8M028831: from=<yugiohjcj@bbb.org>, size=670, class=0, nrcpts=0, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=smtp5-g21.free.fr [212.27.42.5]
So the error is now "User unknown".
To fix it, I add "yugiohjcj" as a user on my server:
Code:
$ sudo useradd yugiohjcj
$ sudo mkdir /home/yugiohjcj
$ sudo chown yugiohjcj:users /home/yugiohjcj
Now, through a mail client (Mozilla Thunderbird), I send an e-mail from yugiohjcj@bbb.org to yugiohjcj@aaa.org.
On the server side, I can read in the log:
Code:
Apr  7 10:54:26 server sm-mta[28872]: x378sQdS028872: from=<yugiohjcj@bbb.org>, size=616, class=0, nrcpts=1, msgid=<a0dcb7b9-24be-475e-69a7-ae1c98963aa2@bbb.org>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=smtp5-g21.free.fr [212.27.42.5]
Apr  7 10:54:27 server sm-mta[28873]: x378sQdS028872: to=<yugiohjcj@aaa.org>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30817, dsn=2.0.0, stat=Sent
It works!
I can now login through SSH to my server as the "yugiohjcj" user and check my mails through a mail client like Mutt.
So, we can say that the original problem on this forum thread is fixed.

However, now I would like instead of receiving the mail directly on the local mailbox on the server to transfer it to an other mailbox for example bob@aol.com or bob@yahoo.com.
To do that, I just need to edit a file in the user home directory: ~/.forward.
Its content is:
Code:
bob@aol.com
It works!
I am receiving the mail in the specified mailbox.

However, now I would like instead of adding an user "yugiohjcj" on the server machine, to configure sendmail so it will accept to receive a mail to yugiohjcj@aaa.org for the user "john" on my server.
To do that, I need to edit a file: /etc/mail/virtusertable.
Its content is:
Code:
yugiohjcj@aaa.org john
After that, I need to create the database from this file:
Code:
makemap hash virtusertable.db < virtusertable
It works!
I am receiving the mail in the john mailbox when it is sent to yugiohjcj@aaa.org.
So, I don't need anymore to add an user.

Thanks for your help.

Last edited by YuGiOhJCJ; 04-19-2019 at 11:22 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail.... Relaying denied. IP name lookup failed Krishna2412 Linux - Security 6 06-21-2005 01:01 AM
Email "Relaying denied" (sendmail) Wynand1 Linux - Networking 1 04-06-2005 07:47 AM
Relaying denied, Sendmail 8.12.9 grieseju Linux - Software 1 05-07-2003 09:10 AM
"Relaying Denied" by Sendmail colporteur Linux - General 2 12-27-2002 08:40 AM
Sendmail Relaying Denied barDo Linux - Networking 2 11-07-2001 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration