Spara inställningar postfix

If you need to alter the result and retain your changes between installs/updates then you have to copy the respective file (_postfix.conf.master) from the install archive to the */usr/local/ispconfig/server/conf-custom/install folder and edit it accordingly.

Next time when you will install/update your inspconfig the templates residing in conf-custom/install in will take precedence to the ones available in the install/update archive.

PostSRSd

För att dkim ska fungera för vidarebefordrade mail…

apt-get install postsrsd

lägg till i main.cf
sender_canonical_maps = tcp:localhost:10001
sender_canonical_classes = envelope_sender
recipient_canonical_maps = tcp:localhost:10002
recipient_canonical_classes= envelope_recipient,header_recipient

Blockera mottagare postfix

För att blockera mail till en viss mottagare.

main.cf
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access
Synology (hash:/volume1/@optware/etc/postfix/recipient_access)

recipient_access
mail@example.com REJECT

postmap /etc/postfix/recipient_access

postfix reload

Backup/redirection MX ghettosmtp

You’re all set up! Just change your domain’s MX records to in1.ghettosmtp.com and in2.ghettosmtp.com. Please don’t use only one of those two, and don’t prioritize in2 over in1. Once you do that you’ll be getting email sent down to your mail server.

Port är inte ändrad i postfix, bara brandväggen, port 2528

Postfix, mailgraph och syslog-ng synology

Starta om syslog-ng
initctl restart syslog-ng

vi /usr/local/etc/syslog-ng/patterndb.d/mail.conf
template template_date_format {
template(”${MONTH_ABBREV} ${DAY} ${HOUR}:${MIN}:${SEC} ${HOST} ${MSGHDR}${MSG}\n”);
template_escape(no);
};

destination mail { file(”/var/log/mail.log” template(template_date_format)); };
destination mailwarn { file(”/var/log/mail.warn”); };
destination mailerr { file(”/var/log/mail.err”); };

filter f_mail { facility(mail); };
filter f_warn { level(warn); };
filter f_err { level(err); };

log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };

Postfix till synology

/opt/etc/postfix/

Skicka mail till primär MX på annan port
transport_maps = hash:/opt/etc/postfix/transport

vi /opt/etc/postfix/transport

mailhost smtp:[mailserver]:port
.mailhost.se smtp:[mailserver]:port

postmap /opt/etc/postfix/transport

postfix reload

Byta avsändare på mail i postfix queue

För att byta avsändare (eller mottagare, alla adresser byts enligt detta)

I /etc/postfix/main.cf lägg till canonical_maps = hash:/etc/postfix/canonical

I /etc/postfix/canonical
email@example.com newemail@anotherexample.com

# postmap /etc/postfix/canonical
# postfix reload

Få mail i kön att köas på nytt
# sudo postsuper -r ALL

Ändra tillbaka:
Töm canonical och kör postmap igen

För att kolla vad som finns i mailkön
mailq

Rättigheter utöver chmod, ACL

setfacl -Rm d:u:foo:rwX /folder/

-R recursive
-m modify
d default
u user (foo)

Kör även utan d för att ändra befintliga filer, annars ändras enbart default för nya.
för att kontrollera getfacl

Hämtat från
http://serverfault.com/questions/2736/how-does-one-get-setfacl-to-set-acl-permissions-recursively-on-linux

Inställningar tema nova-lite

Ändra i filen wp-content/themes/nova-lite/core/templates/after-content.php
Rad 16 och 17, det ska vara the_content();

<?php 

/**
 * Wp in Progress
 * 
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */

function novalite_after_content_function() {

	if ((is_home()) || (is_category()) || (is_page() )):
		
		//the_excerpt(); 
		the_content();
	else:
	
		the_content();
		the_tags( '<footer class="line"><span class="entry-info"><strong>'.__( 'Tags','novalite').':</strong> ', ', ', '</span></footer>' );

		if ( get_post_format() )  {
			echo '<footer class="line"><span class="entry-info"><strong>'.__( 'Post type','novalite').':</strong> '.ucfirst(get_post_format()).'</span></footer>';
		} 

		comments_template();
	
	endif;

} 

add_action( 'novalite_after_content', 'novalite_after_content_function', 10, 2 );

?>