mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-25 18:00:54 +00:00 
			
		
		
		
	Add a logfile entry to the NSD conf file
Having a log file can help debugging when something goes wrong and NSD doesn't fail or MiaB doesn't notify you. See https://discourse.mailinabox.email/t/dns-email-domain-becomes-inaccessible-every-few-hours/3770
This commit is contained in:
		
							parent
							
								
									504a9b0abc
								
							
						
					
					
						commit
						c27082dbfa
					
				
							
								
								
									
										13
									
								
								setup/dns.sh
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								setup/dns.sh
									
									
									
									
									
								
							| @ -26,6 +26,7 @@ cat > /etc/nsd/nsd.conf << EOF; | |||||||
| # Do not edit. Overwritten by Mail-in-a-Box setup. | # Do not edit. Overwritten by Mail-in-a-Box setup. | ||||||
| server: | server: | ||||||
|   hide-version: yes |   hide-version: yes | ||||||
|  |   logfile: "/var/log/nsd.log" | ||||||
| 
 | 
 | ||||||
|   # identify the server (CH TXT ID.SERVER entry). |   # identify the server (CH TXT ID.SERVER entry). | ||||||
|   identity: "" |   identity: "" | ||||||
| @ -41,6 +42,18 @@ server: | |||||||
| 
 | 
 | ||||||
| EOF | EOF | ||||||
| 
 | 
 | ||||||
|  | # Add log rotation | ||||||
|  | cat > /etc/logrotate.d/nsd <<EOF; | ||||||
|  | /var/log/nsd.log { | ||||||
|  |   weekly | ||||||
|  |   missingok | ||||||
|  |   rotate 12 | ||||||
|  |   compress | ||||||
|  |   delaycompress | ||||||
|  |   notifempty | ||||||
|  | } | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
| # Since we have bind9 listening on localhost for locally-generated | # Since we have bind9 listening on localhost for locally-generated | ||||||
| # DNS queries that require a recursive nameserver, and the system | # DNS queries that require a recursive nameserver, and the system | ||||||
| # might have other network interfaces for e.g. tunnelling, we have | # might have other network interfaces for e.g. tunnelling, we have | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user