mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
zpush/owncloud: inject mail using 'sendmail' not SMTP
This commit is contained in:
parent
7b81ea1834
commit
cf4f519cc0
@ -32,7 +32,7 @@ define('IMAP_FROM_LDAP_FROM', '#givenname #sn <#mail>');
|
|||||||
define('IMAP_SENTFOLDER', '');
|
define('IMAP_SENTFOLDER', '');
|
||||||
define('IMAP_INLINE_FORWARD', true);
|
define('IMAP_INLINE_FORWARD', true);
|
||||||
define('IMAP_EXCLUDED_FOLDERS', '');
|
define('IMAP_EXCLUDED_FOLDERS', '');
|
||||||
define('IMAP_SMTP_METHOD', 'smtp');
|
define('IMAP_SMTP_METHOD', 'sendmail');
|
||||||
|
|
||||||
global $imap_smtp_params;
|
global $imap_smtp_params;
|
||||||
$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');
|
$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');
|
||||||
|
@ -38,16 +38,16 @@ if [ ! -f "/usr/local/lib/owncloud/config/config.php" ]; then
|
|||||||
"memcached_servers" => array (
|
"memcached_servers" => array (
|
||||||
array('localhost', 11211),
|
array('localhost', 11211),
|
||||||
),
|
),
|
||||||
'mail_smtpmode' => 'smtp',
|
'mail_smtpmode' => 'sendmail',
|
||||||
'mail_smtpsecure' => 'tls',
|
'mail_smtpsecure' => '',
|
||||||
'mail_from_address' => 'no-reply',
|
|
||||||
'mail_domain' => '$PRIMARY_HOSTNAME',
|
|
||||||
'mail_smtpauthtype' => 'LOGIN',
|
'mail_smtpauthtype' => 'LOGIN',
|
||||||
'mail_smtpauth' => true,
|
'mail_smtpauth' => false,
|
||||||
'mail_smtphost' => 'localhost',
|
'mail_smtphost' => '',
|
||||||
'mail_smtpport' => '587',
|
'mail_smtpport' => '',
|
||||||
'mail_smtpname' => 'no-reply@$PRIMARY_HOSTNAME',
|
'mail_smtpname' => '',
|
||||||
'mail_smtppassword' => '$SECRET_PASSWORD',
|
'mail_smtppassword' => '',
|
||||||
|
'mail_from_address' => 'owncloud',
|
||||||
|
'mail_domain' => '$PRIMARY_HOSTNAME',
|
||||||
'logtimezone' => '$TIMEZONE',
|
'logtimezone' => '$TIMEZONE',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
@ -78,4 +78,4 @@ chmod -R 777 /usr/local/lib/owncloud/apps/mail/vendor/ezyang/htmlpurifier/librar
|
|||||||
(crontab -u www-user -l; echo "*/15 * * * * php -f /usr/local/lib/owncloud/cron.php" ) | crontab -u www-user -
|
(crontab -u www-user -l; echo "*/15 * * * * php -f /usr/local/lib/owncloud/cron.php" ) | crontab -u www-user -
|
||||||
|
|
||||||
php5enmod imap
|
php5enmod imap
|
||||||
restart_service php5-fpm
|
restart_service php5-fpm
|
||||||
|
@ -250,15 +250,11 @@ if [ -z "$STORAGE_ROOT" ]; then
|
|||||||
chown $STORAGE_USER.$STORAGE_USER $STORAGE_ROOT/mailinabox.version
|
chown $STORAGE_USER.$STORAGE_USER $STORAGE_ROOT/mailinabox.version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate a secret password to use with no-reply user (mainly for ownCloud SMTP atm)
|
|
||||||
SECRET_PASSWORD=$(dd if=/dev/random bs=20 count=1 2>/dev/null | base64 | fold -w 24 | head -n 1)
|
|
||||||
|
|
||||||
# Save the global options in /etc/mailinabox.conf so that standalone
|
# Save the global options in /etc/mailinabox.conf so that standalone
|
||||||
# tools know where to look for data.
|
# tools know where to look for data.
|
||||||
cat > /etc/mailinabox.conf << EOF;
|
cat > /etc/mailinabox.conf << EOF;
|
||||||
STORAGE_USER=$STORAGE_USER
|
STORAGE_USER=$STORAGE_USER
|
||||||
STORAGE_ROOT=$STORAGE_ROOT
|
STORAGE_ROOT=$STORAGE_ROOT
|
||||||
SECRET_PASSWORD=$SECRET_PASSWORD
|
|
||||||
PRIMARY_HOSTNAME=$PRIMARY_HOSTNAME
|
PRIMARY_HOSTNAME=$PRIMARY_HOSTNAME
|
||||||
PUBLIC_IP=$PUBLIC_IP
|
PUBLIC_IP=$PUBLIC_IP
|
||||||
PUBLIC_IPV6=$PUBLIC_IPV6
|
PUBLIC_IPV6=$PUBLIC_IPV6
|
||||||
@ -323,8 +319,5 @@ if [ -z "`tools/mail.py user`" ]; then
|
|||||||
|
|
||||||
# Create an alias to which we'll direct all automatically-created administrative aliases.
|
# Create an alias to which we'll direct all automatically-created administrative aliases.
|
||||||
tools/mail.py alias add administrator@$PRIMARY_HOSTNAME $EMAIL_ADDR
|
tools/mail.py alias add administrator@$PRIMARY_HOSTNAME $EMAIL_ADDR
|
||||||
|
|
||||||
# Create an no-reply user to use with ownCloud
|
|
||||||
tools/mail.py user add no-reply@$PRIMARY_HOSTNAME $SECRET_PASSWORD
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user