????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.139.89.220 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/msmtp/examples/set_sendmail/ |
Upload File : |
# Default setting used if the domain name can not be found, or if something goes # wrong. #default='/usr/sbin/sendmail -oem -oi' # Make matching case insensitive shopt -s nocasematch # Regexp matching the host name of the machine this script should run on. (Other # machines get the default above). run_hosts='^baradur|mordor$' # The file /etc/resolv.conf is egrepped against patterns in the array # "resolv_regexp" (A leading "!" denotes negation of match). If a match is found # the corresponding msmtp account (from the accounts array) is used. # # If no match is found, then this script gets the domain name. This could be # time consuming if it is not found in /etc/resolv.conf, as it involves a name # server lookup. The domain name is then matched against the (bash) regexp's in # the array "dom_regexp". If a match is found, the corresponding msmtp account # (from the accounts array) is used. # # Patterns are matched in the order they are defined. If no pattern matches, # then the script produces no output. # # An account named "ssh" is special. It calls the function ssh_tunnel when such # an account is selected. # # The following are the settings I use on my laptop. # Use default account if we could not get the domain name. accounts+=(default) dom_regexp+=('^$') resolv_regexp+=('!nameserver') # Use account 'stanford' from within the Stanford.EDU domain. accounts+=(stanford) #dom_regexp+=('^(Stanford\.EDU|gi1242.net)$') dom_regexp+=('^Stanford\.EDU$') resolv_regexp+=('^(nameserver[[:space:]]+171\.64\.7\.|search.*[[:space:]]stanford.edu)') # ri.cox.net seems to have firewalled port 25, so use ssh tunnelling in this # domain. (The function ssh_tunnel (called automatically) sets up the tunnel) accounts+=(ssh) dom_regexp+=('(^|\.)(ri\.cox\.net|near.uiuc.edu)$') resolv_regexp+=('') # From outside the Stanford.EDU domain, use account 'roam' with Kerberos # authentication. It involves typing my password once a day (when my kerberos # tickets expire), but is faster than ssh tunneling. (This requires traffic # through port 25 to not be firewalled) accounts+=(roam) dom_regexp+=('.') resolv_regexp+=('') # Ignore case while matching. shopt -s nocasematch # Function called when account named "ssh" is used function ssh_tunnel() { debug "Starting SSH tunnel" # Kill an already running tunnel (connection might be inactive) pkill -f '^ssh.*8025:math:25' # Create a tunnel to mail server. Forward local port 8025 to remote 25 ssh -N -f -L 8025:math:25 math & } # # End user settings # # vim: set ft=sh: