LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Adding local users to exim4 (https://www.linuxquestions.org/questions/linux-software-2/adding-local-users-to-exim4-395848/)

daemon_14 12-23-2005 01:32 AM

Adding local users to exim4
 
hello all,

i'm currently running debian 3.1 with the 2.4 kernel as an ftp server for my school district. i also have allowed ssh access to it through the firewall, so i or any other admin can admin the box. we often need to share log file information, but find it cumbersome to copy and paste and send in an e-mail. i had initially installed exim4 to the box, but never gave it any thought until now. the only problem is that only my user, and one other user (who gave me the idea) have a mailbox under /var/mail. i haven't found anything online regarding local accounts (from what it seems, no one else has had this trouble, or the users are automatically added). is there a way i can create user accounts for some or all of the users on this box...?

thanks,
q.

foo_bar_foo 12-23-2005 06:45 PM

the best thing to do is just rerun
/usr/sbin/eximconf
as root
otherwise i think we need to see /etc/exim.conf

daemon_14 12-24-2005 01:51 AM

ok...there is no /usr/sbin/eximconf or /etc/exim.conf...possible version mismatch (i'm using exim4 and commands are for exim3...?) or maybe differences in distros...who knows...anyhooo
tried "dpkg-reconfigure exim4-config" to see if the configuration would correct itself...no dice...
i like to mail someone using "cat | mail username" creating a message using standard input...and a control-d to break. it won't create a user in /var/mail/ this way...but if i simply use "mail username" it will create their mailbox for them....hmmmm....
i've looked to update the exim4.conf...but...from as best as i can find...i only have
/etc/exim4/ with several folders in it....

Code:

Box-name:/usr/sbin# ls /etc/exim4
conf.d  exim4.conf.template  passwd.client  update-exim4.conf.conf

and under conf.d:

Code:

Box-name:/usr/sbin# ls /etc/exim4/conf.d/
acl  auth  main  retry  rewrite  router  transport

I can't understand where the main configuration is...as i've grepped the rc5.d scripts and they mention a creation of an exim4.conf

Code:

Box-name:/usr/sbin# grep .conf /etc/rc5.d/S20exim4
upex4conf() {
  UPEX4CONF="update-exim4.conf"
# Exit if exim runs from /etc/inetd.conf
if [ -f /etc/inetd.conf ] && grep -E -q "^ *([0-9.]+:)?smtp" /etc/inetd.conf
  upex4conf
# check for valid configuration file
isconfigvalid()
  echo "Warning! Invalid configuration file for $NAME. Exiting." 1>&2
    # regenerate exim4.conf
    upex4conf
    isconfigvalid
    # regenerate exim4.conf
    upex4conf
    isconfigvalid
    echo "Reloading $NAME configuration files"
    # regenerate exim4.conf
    upex4conf
    isconfigvalid

Of course this is just the runlevel5 script, which is a mirror of the init.d script....but...it does mention this exim4.conf...nothing in the /etc/rcS.d/ mentions exim4...but i did find this...

Code:

Box-name:/usr/sbin# grep /usr/lib/exim4 /etc/rc5.d/S20exim4
test -x /usr/lib/exim4/exim4 || exit 0

which is just another link to the program...
this was also mentioned:

Code:

Box-name:/usr/lib/exim4# ls /var/lib/exim4/               
config.autogenerated

And all of this has left me running in circles...i'm kinda lost on where to look....worst case scenario...i just use the mail command to create all user boxes...but there seems like there has to be an easier way...

thanks,
q.

foo_bar_foo 12-26-2005 02:01 PM

hi,
your config file is split into all it's component peices in /etc/exim4/conf.d/

but yea i think that command "cat | mail" is a little strange - i mean you are piping stdout (or any possible stderr) to BSD mail ? certainly thats not what mail expects. it's looking for it's junk like Cntrl. D and stuff. So i bet that's just causing an error.

daemon_14 12-27-2005 12:44 AM

yah...that does make sense...but...its just another way of doing it...it works fine when the user is configured under /var/mail...this way i can copy my configuration to stdout by using the middle mouse and then control D to break it and send it...but...thats the beauty of linux...so many ways to do one thing...
i was just looking for a script or maybe a dpkg-reconfigure command to execute to read the local machines users and create a mail account for them under /var/mail...expecially since i have the box set up just to act as a local mail server for itself...
i dunno...maybe i'll tinker more...it gives me something to do...

thanks,
q.

New2Linux2 10-13-2006 03:32 PM

I realize this is an older post, but I was wondering if anyone has found an answer to it. I just finished an install of Debian Sarge with Exim4 for corporate email and noticed that there is only one user listed under /var/mail/ - me. How do I get the rest of the mailboxes setup for all of the domain users? I tried the "mail username" line listed above, but no help. Anyone have any ideas?


All times are GMT -5. The time now is 12:00 AM.