Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-01-2010, 06:12 AM
|
#1
|
Member
Registered: Jan 2008
Posts: 103
Rep:
|
Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found
Hi,
I am using webmin for my daily tasks. I have fedora 13, whenever I click on ''Sendmail M4 Configuration'' or Outgoing Addresses (generics)'' I get the following error message
Quote:
The Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found on your system, or is not the correct directory. Maybe it has not been installed (common for packaged installs of Sendmail), or the module config is incorrect.
|
I read documentation at sendmail.org, it seems that structure of directories for send mail has been changed in version sendmail-8.1.4 shipped with FC13.
In webmin config module we have
Quote:
Sendmail M4 base directory = /usr/share/sendmail-cf
|
which is not there. I did a locate / sendmail-cf on the command line, it finds nothing
Thanks for your help
|
|
|
11-01-2010, 06:40 AM
|
#2
|
Senior Member
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Rep: 
|
Hi,
Please see if sendmail rpm is installed
Code:
rpm -qa |grep -i sendmail
Last edited by prayag_pjs; 11-01-2010 at 06:41 AM.
|
|
|
11-01-2010, 11:29 AM
|
#3
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
Yes
Yes sir it is setup
Code:
[root@myinux salam]# rpm -qa |grep -i sendmail
sendmail-8.14.4-4.fc13.x86_64
|
|
|
11-02-2010, 01:16 AM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
You need to install also sendmail-cf package
Code:
yum install sendmail-cf
Regards
|
|
|
11-02-2010, 06:02 PM
|
#5
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
Correct
Thanks, I setup sendmail-cf and error disappeared.
From command line I can send email to root.
I tried to test sendmail setup by sending an email to my public email provided by my internet provider as follows
Code:
mail oneofemails@free.fr
I get the error
Quote:
553 sorry, your
envelope sender domain must exist (#5.7.1) (in reply to MAIL FROM command) while talking to mx1.free.fr
|
I added
Code:
FEATURE(`genericstable')dnl
I have generictable with 1 record
root myemail@free.fr
which I can see in the list of outgoing emails in webmin
Also, I modified smart host as follows
Code:
dnl define(`SMART_HOST', `smtp.free.fr')dnl
and added
Code:
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')
in which I have authentification information for myemail@free.fr for my smtp.free.fr provider smtp.
Still getting the ame error.
Thanks for your help
|
|
|
11-03-2010, 03:06 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
You should post the whole error (all the headers of the return mail) and maybe also what is logged in /var/log/maillog.
I can only guess that you have to masquerade your hostname. Take a look here for details
Regards
|
|
|
11-03-2010, 06:46 AM
|
#7
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
Bathory, in webmin, it is clearly indicated "Domain Masquerading'' the following
Quote:
If a domain is given above, sendmail will alter the From address of all outgoing messages to appear to come from that domain. In addition, any email messages passing through your system from one of the hosts or domains listed below will also have their From addresses modified in the same way. Note that any domain masquerading defined here can be overriden for specific users using the Outgoing Addresses page.
|
As I said, I have configured in ''outgoing addresses''
Code:
Mail from Change to
root mylinux@free.fr
Do you mean that I shoul have both configured in order that redirection works.
Here is the info from maillog
Quote:
Nov 2 23:48:42 salamlinux sm-msp-queue[755]: starting daemon (8.14.4): queueing@01:00:00
Nov 2 23:50:08 salamlinux sendmail[906]: oA2Mo772000906: from=root, size=226, class=0, nrcpts=1, msgid=<201011022250.oA2Mo772000906@localhost.localdomain>, relay=root@localhost
Nov 2 23:50:08 salamlinux sendmail[907]: oA2Mo8jQ000907: from=<root@localhost.localdomain>, size=485, class=0, nrcpts=1, msgid=<201011022250.oA2Mo772000906@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=salamlinux [127.0.0.1]
Nov 2 23:50:08 salamlinux sendmail[906]: oA2Mo772000906: to=anotheremail@free.fr, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30226, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (oA2Mo8jQ000907 Message accepted for delivery)
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000907: to=<anotheremail@free.fr>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120485, relay=mx1.free.fr. [212.27.48.6], dsn=5.1.1, stat=User unknown
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000907: oA2Mo8jQ000909: DSN: User unknown
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000909: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31722, dsn=2.0.0, stat=Sent
|
and the email alert I receive for root
The original message was received at Tue, 26 Oct 2010 18:01:16 +0200
from salamlinux [127.0.0.1]
Quote:
----- The following addresses had permanent fatal errors -----
<mylinux@free.fr>
(reason: 550 5.1.8 your MAIL FROM is refused for this recipient : 553 sorry, your envelope sender domain must exist (#5.7.1))
----- Transcript of session follows -----
... while talking to mx1.free.fr.:
>>> RCPT To:<anotheremail@free.fr>
<<< 550 5.1.8 your MAIL FROM is refused for this recipient : 553 sorry, your envelope sender domain must exist (#5.7.1)
550 5.1.1 <mylinux@free.fr>... User unknown
>>> DATA
<<< 554 5.5.1 no valid recipients
|
Last edited by eliassal; 11-03-2010 at 06:51 AM.
|
|
|
11-03-2010, 07:57 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
Quote:
... from=<root@localhost.localdomain>, ...
|
As you see this doesn't work. I guess you have to add localhost.localdomain in /etc/mail/genericsdomain, depending of your sendmail configuration.
If you don't want to go with masquerading, take a look at this thread here at LQ (specially last post)
Regards
|
|
|
11-03-2010, 12:17 PM
|
#9
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
Not so clear GENERICS_DOMAIN_FILE for me
bathory,
In this thread it is indicated to add
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
how this should be added? snedmail.cf, there is "define'', "feature, I tried to adding it manullay to cf filem, it doesnt rebuild, I used webmin same result, where this directive should go, is it a feature, a parameter, define or other
When I add
Quote:
Other GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl
|
Rebuild fails with this
Code:
Failed to build configuration :
m4:/etc/mail/sendmail.mc:178: ERROR: end of file in string
.......
I am really stuck
|
|
|
11-03-2010, 01:33 PM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
You need to add this in the sendmail.mc used to create your current sendmail.cf. After that you should run:
Code:
m4 sendmail.mc > /etc/mail/sendmail.cf
Before anything else you should make a backup of your current running sendmail.cf, because the above command will overwrite the existing sendmail.cf
Regards
|
|
|
11-03-2010, 03:49 PM
|
#11
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
added and ran m4, but .....
Thanks bathory,
added the lines manullay to .mc file, ran the m4 and have a new sendmail.cf generated
I also regenerated the genericstable.
still getting the same error as if sendmail; is not taking into consideration the mapping with outgoing addresses generics table
|
|
|
11-03-2010, 06:41 PM
|
#12
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
Did you created the /etc/mail/genericsdomain?
From the link of my previous post you should run:
Code:
sendmail -bt -d0.1 < /dev/null
to find out what domain names you should put in that file. You need to restart sendmail for the changes to take effect.
I also think that you need to add:
Code:
FEATURE(`masquerade_envelope')dnl
in the sendmail.mc file, so both the header and the envelope "From:" address is rewritten
|
|
|
11-03-2010, 07:01 PM
|
#13
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
Yes I did
es, I did this, stoped and restarted sendmail.
Here is te last portion of m sendmail.mc
Quote:
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
FEATURE(`genericstable',`hash /etc/mail/genericstable')
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
dnl GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl
|
|
|
|
11-03-2010, 07:09 PM
|
#14
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
sorry I clicked submit before I finishe
So you can notice
dnl FEATURE(masquerade_envelope)dnl
and
dnl GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl.
Regarding
Code:
sendmail -bt -d0.1 < /dev/null
One question though to be on the same page, should I create a file called genericsdomain and leave it empty? After running this command, I get some infoirmation displayed as follows
Quote:
[root@mylinux mail]# sendmail -bt -d0.1 < /dev/null
Version 8.14.4
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
TCPWRAPPERS USERDB USE_LDAP_INIT
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = mylinux
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
|
so should I do something this?
|
|
|
11-03-2010, 07:16 PM
|
#15
|
Member
Registered: Jan 2008
Posts: 103
Original Poster
Rep:
|
By ''to find out what domain names you should put in that file''
Do you or the thread write mean I need to manually create a file and place
Quote:
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = mylinux
========================================================
|
or only
Quote:
localhost
localhost.localdomain
localdomain
|
|
|
|
All times are GMT -5. The time now is 02:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|