Results 1 to 6 of 6
  1. #1

    Question how to send mail with exim

    I just bought a vps with cpanel and experimenting with it as I am a total newbie.

    Previously I have been using cgi sendmail path (/usr/sbin/sendmail) to send automated emails to my members. But now with this new server using exim, I am unable to send emails with this cgi script.

    Do I need to configure exim to run this script?
    Basically I need to know how to use exim? How should my cgi script be like to send emails?

    Thanks
    Lisa
    server admin newbie but learning!

  2. #2
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    exim -t behaves similar to sendmail -t.

    You could just symlink sendmail to the exim binary:

    # ln -s /usr/local/sbin/exim /usr/sbin/sendmail
    # ln -s /usr/local/sbin/exim /usr/bin/mailq
    ... etc ... (change paths as per your system)

    On FreeBSD, the 'correct' method is to use mailwrapper, which is configured in /etc/mail/mailer.conf. Most likely your VPS is Linux based though, so the symlink way should be fine - unless there is a similar mechanism in place.

  3. #3
    Yes, I am using Linux with cPanel.

    Where do I add the sysmlink? Please advise me what to change in order to send email with exim.

    In a typical send mail cgi script, I use the codes below:

    $mailprog = '/usr/sbin/sendmail';
    open (MAIL, "$mailprog -t");
    print MAIL " email content.... ";
    Lisa
    server admin newbie but learning!

  4. #4
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    You could always change $mailprog in your CGI script to '/usr/local/sbin/exim'

    That assumes exim lives in /usr/local/sbin. It could also be in /usr/sbin, /usr/lib or plenty of other bizarre places - If you're not sure where it resides, you'll need to search for it using find, whereis, which, locate, etc - maybe cpanel has a file search feature? (I wouldn't know - never used it !)

    btw - are you aware of the perl module Mail:endmail ? It doesn't require sendmail at all, since it makes a socket connection to your SMTP server of choice.
    Last edited by simonhouse; 04-06-2004 at 12:50 PM.

  5. #5
    I found exim in /usr/sbin/exim and changed $mailprog in my cgi script to reflect that. The cgi runs without error but I still cannot receive any email.

    Any idea what's the reason? Is there any configuration I need to do?

    Thanks
    Lisa
    server admin newbie but learning!

  6. #6
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    Debugging the MTA can be a little more tricky.

    - Is mail bounced, frozen, looping or going into a black hole?
    - Do you have DNS MX records correctly set?
    - Is your domain name listed in local_domains?
    - What do the logs say (mainlog, paniclog, rejectlog)?
    - Does local mail route?
    - Try a fake SMTP session- exim -bh 127.0.0.1

    You will normally need to do some basic configuration to get your mail server going, and that is probably all possible via Cpanel. Maybe a 'cpaneller' on this forum could provide some more useful tips? Or if you want to do it using the shell, www.exim.org has everything you need to get going.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •