LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 11-01-2010, 06:12 AM   #1
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Rep: Reputation: 0
Question 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
 
Old 11-01-2010, 06:40 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,132
Blog Entries: 4

Rep: Reputation: 146Reputation: 146
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.
 
Old 11-01-2010, 11:29 AM   #3
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
Yes

Yes sir it is setup
Code:
[root@myinux salam]# rpm -qa |grep -i sendmail
sendmail-8.14.4-4.fc13.x86_64
 
Old 11-02-2010, 01:16 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,773

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You need to install also sendmail-cf package
Code:
yum install sendmail-cf
Regards
 
Old 11-02-2010, 06:02 PM   #5
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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
 
Old 11-03-2010, 03:06 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,773

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 11-03-2010, 06:46 AM   #7
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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.
 
Old 11-03-2010, 07:57 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,773

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 11-03-2010, 12:17 PM   #9
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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
 
Old 11-03-2010, 01:33 PM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,773

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 11-03-2010, 03:49 PM   #11
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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
 
Old 11-03-2010, 06:41 PM   #12
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,773

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 11-03-2010, 07:01 PM   #13
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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
 
Old 11-03-2010, 07:09 PM   #14
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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?
 
Old 11-03-2010, 07:16 PM   #15
eliassal
Member
 
Registered: Jan 2008
Posts: 77

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail M4 configuration base directory? Polaris2203 Slackware 9 02-09-2014 10:25 PM
RHEL 4: Webmin 1.22 dont find sendmail base dir.. latino Linux - Networking 0 09-05-2005 12:34 PM
Delete /usr/share directory? t3___ Linux - Newbie 4 03-09-2005 07:54 PM
Nail looking for Sendmail in /usr/lib/sendmail Berhanie Slackware 2 02-22-2005 11:18 AM
Cannot open /usr/share/sendmail-cf/m4/cf.m4 atomicx Linux - Networking 3 01-02-2004 09:44 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration