How to send emails using the sendmail wrapper

How to set correct permissions for the sendmail wrapper

Error cause

Cannot send e-mails from scripts or console-based MUAs, using the sendmail wrapper shipped with AXIGEN.


In order to get sendmail work, first of all, you need to create a symbolic link (if not already created at installation), in the /usr/sbin/ directory, which will link to the ${SENDMAIL} command line wrapper:
 ln -sf ${SENDMAIL} /usr/sbin/sendmail 
After this, change the binary ownership to belong to the 'axigen' user and group and then set its SUID and GUID bits:
chown axigen:axigen ${SENDMAIL}
chmod 6750 ${SENDMAIL}
Note: The chown command will reset the SUID and GUID bits, so you need to issue it before the chmod command.

At the end, in order for any user to be able to send e-mails using the command line sendmail wrapper, you need to insert the respective user in the axigen group.

Warning: Setting the SUID and GUID bits is considered a security issue and should be taken care of very carefully.

Note: Replace ${SENDMAIL} with your OS-specific location of the AXIGEN shipped sendmail binary:
- In Linux/Solaris: /opt/axigen/bin/sendmail
- In FreeBSD/OpenBSD: /usr/local/bin/sendmail.axigen
- In NetBSD: /usr/pkg/bin/sendmail.axigen

 # If you are using Linux: ln -sf /opt/axigen/bin/sendmail /usr/sbin/sendmail
chown axigen:axigen /opt/axigen/bin/sendmail
chmod 6750 /opt/axigen/bin/sendmail # If you are using FreeBSD: ln -sf /usr/local/bin/sendmail.axigen /usr/sbin/sendmail chown axigen:axigen /usr/local/bin/sendmail.axigen
chmod 6750 /usr/local/bin/sendmail.axigen
Applies to
Releases: Axigen 2..xAxigen 3..xAxigen 4..x
OS: LinuxWindowsFreeBSDMACOpenBSDNetBSDSolaris
Distros: RPM based distrosRPM based distros with gcc4SlackwareDEB based distrosUbuntuGentooFreeBSD 8 amd64NetBSD 3.0OpenBSD 3.8MACWindowsOpenBSD 3.9Solaris 10 x86FreeBSD 6.1Mandriva LinuxDEB based distros with gcc4Yellow Dog