Posts Tagged ‘systems’

Exim: Restrict Authenticated Outgoing Email with Sender Domain

Thursday, January 27th, 2011

Most of the outgoing SMTP server allowed the user to set different sender email address once it is authenticated. But we might be in risk for allowing the user to send outgoing bulk/spam email via authenticated SMTP with different sender email address.

In Exim mail MTA, it can restricts at the SMTP authenticated transport.


accept  authenticated = *
          sender_domains = < the_domain_name_1 > : < the_domain_name_2 >
          control       = submission
          control       = dkim_disable_verify

Usually local_domains is the list of the domain hosted on Exim mail server, it can be configured as below too.


accept  authenticated = *
          sender_domains = +local_domains
          control       = submission
          control       = dkim_disable_verify

How to Create User with useradd in FreeBSD

Friday, July 9th, 2010

You can invoke “adduser” command in FreeBSD in order to create new user. Adduser will prompt you for user info like name, uid, gid, shell environment and etc. But sometime we would like to create user access through Bash script. “useradd” command is the good way to do it.

In Linux, using “useradd” is pretty common for creating new user access. You can also use “useradd” in FreeBSD, but not directly invoke “useradd” command. Below is the sample of creating new user in FreeBSD with “useradd”.


shell> pw useradd cheryl -c 'Cheryl Windows Admin' -d /home/cheryl -s /usr/local/bin/bash

New user account is created, but don’t forgot to set password for the account


shell> passwd cheryl

You can run other command like “userdel”, “usermod”, “usershow”, “groupadd”, “groupdel”, “groupmod”, “lock”, “unlock” on FreeBSD by using the “pw” command.