Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

simple exim4 config

dirkdirk Member
edited September 2011 in General

Hi,

on my webserver I have a webform that sends mail to a fixed user.
I also have exim4 installed on the system.
Can anybody share a simple config file for Exim4 that only allows mails from this form (localhost?) and send via a remote server (dnslookup for the mx record seems best).

thanks

Comments

  • On debian/ubuntu you just do

    # dpkg-reconfigure exim4-config
    

    and then basically just follow the prompt to configure a Internet site. By default Exim4 would only listen on 127.0.0.1 so no need to firewall it. Also remember to edit your /etc/aliases so your root mails get forwarded to you.

  • Thanks for that last bit. Was just going to ask how to do that.

  • And how can I force the fowarding?

    Tried to set it as Internet site, but mails (from the form) are not forwarded to the actual MX server

  • @dirk -- sorry what do you mean by forwarding? If you mean by sending outbound emails then I think setting it to Internet Site would be enough. For example, from the command line:

    $ echo -e "From: [email protected]\nTo: [email protected]\n\nHello" \
        /usr/lib/sendmail [email protected]
    

    Replace the email address above to the actual addresses. Check /var/log/exim4/mainlog on what action has exim4 actually performed.

  • kylixkylix Member
    edited September 2011

    I guess he does want exim to use a remote smtp-server to send mails. @dirk, does that help?

  • Wouldn't that just be "mail sent by smarthost; no local mail" when you do dpkg-reconfigure exim4-config ?

    Thanked by 1dirk
  • kylixkylix Member
    edited September 2011

    Maybe, I must says I never used exim and therefore never used a remote smtp-server with it.

  • dirkdirk Member
    edited September 2011

    With the "mail send by smarthost, no local mail" option, and using the "echo ..." example given by LowEndAdmin, I get in the logfile

    2011-09-19 08:17:01 Start queue run: pid=11027
    2011-09-19 08:17:01 1R4snp-0007B5-Qd Message is frozen
    2011-09-19 08:17:01 End queue run: pid=11027
    
  • And what errors do you get by using the tutorial?

  • @kylix: at first I didn't see the link in your message.
    Now that I saw it....the "problem" is that the 1st file they point to /etc/mail/exim.conf isn't even on the system...

  • @dirk: Using the "mail sent by smarthost; no local mail" configuration option for exim should be enough for setting up exim to forward all mail.

    What error messages did you get in /var/log/exim4/mainlog when you sent the mail?

    If you can't find the error message you should be able to do exim4 -v -M 1R4snp-0007B5-Qd to get exim to try to deliver the mail again.

    Thanked by 1dirk
  • kylixkylix Member
    edited September 2011

    @dirk: Huh, your exim is without an exim.conf. Are you sure?

  • @kylix: seems like it :-)
    @Leo: looking some more at the logfile I was able to find the problem :-) There were a bunch of those "frozen" messages in the logfile, but also a 550 error. The system was expecting authentication, because I was sending to a none-existing local mailbox. Creating the mailbox on that remote SMTP server (the MX for the domain) and all worked fine...
    Thanks to all for the help!

  • @kylix: On Debian is the exim.conf in /etc/exim4/. If you have selected to split the config file in dpkg-reconfigure exim4-config is exim.conf a directory.

  • On my system: there is under /etc/exim4 no file called exim.conf and no directory with that name either.
    There is however a directory called config.d and in that directory several sub dirs (alc, auth, main, retry, rewrite, router and transport).

  • LeoLeo Member
    edited September 2011

    dirk said: There is however a directory called config.d

    My bad, remembered wrong directory name . The content of exim.conf is spread in subdirs under the conf.d directory when you choose to split the config.

    Thanked by 1dirk
Sign In or Register to comment.