Where is the /etc/mail from?

Code:
ns# cp /usr/src/etc/mail/Makefile   /etc/mail/Makefile
ns# pwd
/usr/src/etc/mail
ns# ll
total 22
-rw-r--r--  1 root  wheel  6818 Oct 25 10:10 Makefile
-rw-r--r--  1 root  wheel  2905 Oct 25 10:10 README
-rw-r--r--  1 root  wheel   634 Oct 25 10:10 access.sample
-rw-r--r--  1 root  wheel  1667 Oct 25 10:10 aliases
-rw-r--r--  1 root  wheel   409 Oct 25 10:10 mailer.conf
-rw-r--r--  1 root  wheel   253 Oct 25 10:10 mailertable.sample
-rw-r--r--  1 root  wheel   582 Oct 25 10:10 virtusertable.sample
ns# cd /etc/mail
ns# make
/usr/sbin/sendmail -bi -OAliasFile=/etc/mail/aliases
/usr/sbin/sendmail: not found
*** Error code 127

Stop in /etc/mail.
ns#
 
I think I only removed /etc/mail and deinstall sendmail ports
Maybe removed /etc/rc.d/sendmail. Maybe not.
But I am sure I did not touch /usr/sbin/sendmail
 
Code:
[187]daemon[/usr/sbin]: ls -al sendmail
lrwxr-xr-x  1 root  wheel  21 Jan 23 13:00 sendmail@ -> /usr/sbin/mailwrapper
[188]daemon[/usr/sbin]: ls -al /usr/libexec/sendmail
total 692
drwxr-xr-x  2 root  wheel     512 Jan 23 13:00 ./
drwxr-xr-x  5 root  wheel    1536 Jan 23 13:00 ../
-r-xr-sr-x  1 root  smmsp  682740 Jan 23 13:00 sendmail*

This is what I have on my system. Pay attention to the paths I am in when I run the commands. @ is a symlink.
in unix it means a shortcut. Unfortunately I have to go to sleep its 1am and I gotta work in 6 hours hopefully someone else here can help you with this or I can continue to help you tommorrow.
 
Code:
ns# ln -s mailwrapper sendmail
ns# cd /etc/mail
ns# make
/usr/sbin/sendmail -bi -OAliasFile=/etc/mail/aliases
/etc/mail/aliases: 27 aliases, longest 10 bytes, 275 bytes total
chmod 0640 /etc/mail/aliases.db

Maybe I only need to get /etc/rc.d/sendmail back.
 
very good be proud of yourself! Thats what you needed. Now add sendmail_enable="YES" to /etc/rc.conf

heres my etc/rc.d/sendmail

Code:
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/sendmail,v 1.19.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
#

# PROVIDE: mail
# REQUIRE: LOGIN cleanvar
#       we make mail start late, so that things like .forward's are not
#       processed until the system is fully operational
# KEYWORD: shutdown

# XXX - Get together with sendmail mantainer to figure out how to
#       better handle SENDMAIL_ENABLE and 3rd party MTAs.
#
. /etc/rc.subr

name="sendmail"
rcvar=`set_rcvar`
required_files="/etc/mail/${name}.cf"
start_precmd="sendmail_precmd"

load_rc_config $name
command=${sendmail_program:-/usr/sbin/${name}}
pidfile=${sendmail_pidfile:-/var/run/${name}.pid}
procname=${sendmail_procname:-/usr/sbin/${name}}

case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
        sendmail_enable="NO"
        sendmail_submit_enable="NO"
        sendmail_outbound_enable="NO"
        sendmail_msp_queue_enable="NO"
        ;;
esac

# If sendmail_enable=yes, don't need submit or outbound daemon
if checkyesno sendmail_enable; then
        sendmail_submit_enable="NO"
        sendmail_outbound_enable="NO"
fi
# If sendmail_submit_enable=yes, don't need outbound daemon
if checkyesno sendmail_submit_enable; then
        sendmail_outbound_enable="NO"
fi

sendmail_precmd()
{
        # Die if there's pre-8.10 custom configuration file.  This check is
        # mandatory for smooth upgrade.  See NetBSD PR 10100 for details.
        #
        if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then
                if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
                        warn \
    "${name} was not started; you have multiple copies of sendmail.cf."
                        return 1
                fi
        fi

        # check modifications on /etc/mail/aliases
        if checkyesno sendmail_rebuild_aliases; then
                if [ -f "/etc/mail/aliases.db" ]; then
                        if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
                                echo \
                "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
                                /usr/bin/newaliases
                        fi
                else
                        echo \
                "${name}: /etc/mail/aliases.db not present, generating"
                                /usr/bin/newaliases
                fi
        fi
}

run_rc_command "$1"

required_files=

if checkyesno sendmail_submit_enable; then
        name="sendmail_submit"
        rcvar=`set_rcvar`
  start_cmd="${command} ${sendmail_submit_flags}"
        run_rc_command "$1"
fi

if checkyesno sendmail_outbound_enable; then
        name="sendmail_outbound"
        rcvar=`set_rcvar`
        start_cmd="${command} ${sendmail_outbound_flags}"
        run_rc_command "$1"
fi

name="sendmail_clientmqueue"
rcvar="sendmail_msp_queue_enable"
start_cmd="${command} ${sendmail_msp_queue_flags}"
pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
required_files="/etc/mail/submit.cf"
run_rc_command "$1"
 
I have to go to sleep I really hope we didnt miss anything and this resolves your problem. Be more careful next time. You may or may not have gotten lucky. Ill help you verify it all tomorrow.
 
inurneck said:
I have to go to sleep i really hope we diddnt miss anything anf this resolves your problem. Be more careful next time. You may or may not have gotten lucky.

Thank you very much!!
It really costed you much time. sorry , it is late at your hemisphere.
 
In a real world where I wake up and go to work, fight, battle all day long, no one appreciates shit and nothings good enough I come home on the PC and have FreeBSD.

A community where we can help each other learn to do what we all enjoy and respect each other along the way. Your welcome times ten, I am rusty in all this I took a 5 year break.

It's been a long time since I seen FreeBSD but I am getting it back little by little. My accident didn't help either.

I bruised my brain in a motor vehicle accident, one of several injuries and nearly died but didn't. Instead in return for my life they took a lot of things I knew previously including *nix and i'll have to relearn them.

But I am grateful to be able to and it would be a lot harder If I wasn't in this google generation. The human mind is an amazing, delicate and dangerous toy.

I had it all a thousand times and lost it. It only makes me stronger, less needy and more experienced.

Anyway, you were worth every minute and it only helped me too in the long run.
 
Thank a lot to inurneck.
Under his instructions, I caught the reason that there is a backspace character appending to my hostname.
This let /etc/mail/Makefile does not work well.
 
Back
Top