Current File : //proc/self/root/lib/python3/dist-packages/twisted/mail/__pycache__/alias.cpython-312.pyc
�

Ϫ�f�]��,�dZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZddl
mZmZd�Zdd	�ZGd
�d�Zee�Gd�d
e��Zee
j(�Gd�d��Zee�Gd�de��ZGd�de�Zee
j(�Gd�d��ZGd�dej4�Zee�Gd�de��Zee
j(�Gd�d��Zee�Gd�de��Zy)zD
Support for aliases(5) configuration files.

@author: Jp Calderone
�N)�implementer)�defer�protocol�reactor)�smtp)�IAlias)�failure�logc�x�|jdd�D�cgc]}|j���}}t|�dk7rd}||f}tj||z�y|\}}	|j|j�g�j
ttj|	jd���ycc}w)a�
    Parse a line from an aliases file.

    @type result: L{dict} mapping L{bytes} to L{list} of L{bytes}
    @param result: A dictionary mapping username to aliases to which
        the results of parsing the line are added.

    @type line: L{bytes}
    @param line: A line from an aliases file.

    @type filename: L{bytes}
    @param filename: The full or relative path to the aliases file.

    @type lineNo: L{int}
    @param lineNo: The position of the line within the aliases file.
    �:��z+Invalid format on line %d of alias file %s.�,N)	�split�strip�lenr
�err�
setdefault�extend�map�str)
�result�line�filename�lineNo�p�parts�fmt�arg�user�aliass
          �4/usr/lib/python3/dist-packages/twisted/mail/alias.py�handler#s���"!%�
�
�3�� 2�3�1�Q�W�W�Y�3�E�3�
�5�z�Q��;���x� ������c�	�����e����$�*�*�,��+�2�2�3�s�y�y�%�+�+�c�BR�3S�T��
4s�B7c��i}d}|�t|�}d}n
t|dd�}d}d}	|D]q}|dz
}|j�}|j�j	d�r�8|j	d	�s|j	d
�r||z}�`|rt||||�|}�s	|r|j
�	|rt||||�|j�D]\}}	t|	||�||<�|S#|r|j
�wwxYw)a�
    Load a file containing email aliases.

    Lines in the file should be formatted like so::

         username: alias1, alias2, ..., aliasN

    Aliases beginning with a C{|} will be treated as programs, will be run, and
    the message will be written to their stdin.

    Aliases beginning with a C{:} will be treated as a file containing
    additional aliases for the username.

    Aliases beginning with a C{/} will be treated as the full pathname to a file
    to which the message will be appended.

    Aliases without a host part will be assumed to be addresses on localhost.

    If a username is specified multiple times, the aliases for each are joined
    together as if they had all been on one line.

    Lines beginning with a space or a tab are continuations of the previous
    line.

    Lines beginning with a C{#} are comments.

    @type domains: L{dict} mapping L{bytes} to L{IDomain} provider
    @param domains: A mapping of domain name to domain object.

    @type filename: L{bytes} or L{None}
    @param filename: The full or relative path to a file from which to load
        aliases. If omitted, the C{fp} parameter must be specified.

    @type fp: file-like object or L{None}
    @param fp: The file from which to load aliases. If specified,
        the C{filename} parameter is ignored.

    @rtype: L{dict} mapping L{bytes} to L{AliasGroup}
    @return: A mapping from username to group of aliases.
    FT�namez	<unknown>r�r
�#� �	)	�open�getattr�rstrip�lstrip�
startswithr#�close�items�
AliasGroup)
�domainsr�fprr/�i�prevr�u�as
          r"�
loadAliasFiler83s��R�F��E�	�z�
�(�^�����2�v�{�3��	�A�
�D���
	�D�
��F�A��;�;�=�D��{�{�}�'�'��,������%�����)>��d�{����6�4��1�5���
	���H�H�J���v�t�X�q�)�����.���1��q�'�1�-��q�	�.��M��
��H�H�J��s�A6C+�+Dc�$�eZdZdZd�Zd�Zdd�Zy)�	AliasBasez�
    The default base class for aliases.

    @ivar domains: See L{__init__}.

    @type original: L{Address}
    @ivar original: The original address being aliased.
    c�F�||_tj|�|_y)z�
        @type domains: L{dict} mapping L{bytes} to L{IDomain} provider
        @param domains: A mapping of domain name to domain object.

        @type original: L{bytes}
        @param original: The original address being aliased.
        N)r2r�Address�original)�selfr2r=s   r"�__init__zAliasBase.__init__�s��������X�.��
�c�H�|j|jjS)z�
        Return the domain associated with original address.

        @rtype: L{IDomain} provider
        @return: The domain for the original address.
        )r2r=�domain�r>s r"rBzAliasBase.domain�s���|�|�D�M�M�0�0�1�1r@Nc�b�|�i}t|�|vryd|t|�<|j�S�aY
        Map this alias to its ultimate destination.

        @type aliasmap: L{dict} mapping L{bytes} to L{AliasBase}
        @param aliasmap: A mapping of username to alias or group of aliases.

        @type memo: L{None} or L{dict} of L{AliasBase}
        @param memo: A record of the aliases already considered in the
            resolution process.  If provided, C{memo} is modified to include
            this alias.

        @rtype: L{IMessage <smtp.IMessage>} or L{None}
        @return: A message receiver for the ultimate destination or None for
            an invalid destination.
        N)r�createMessageReceiver�r>�aliasmap�memos   r"�resolvezAliasBase.resolve�s9�� �<��D��t�9������S��Y���)�)�+�+r@�N)�__name__�
__module__�__qualname__�__doc__r?rBrJ�r@r"r:r:{s���	/�2�,r@r:c�0�eZdZdZd�Zdefd�Zd�Zdd�Zy)	�AddressAliasz�
    An alias which translates one email address into another.

    @type alias : L{Address}
    @ivar alias: The destination address.
    c�d�tj|g|���tj|�|_y)aQ
        @type alias: L{Address}, L{User}, L{bytes} or object which can be
            converted into L{bytes}
        @param alias: The destination address.

        @type args: 2-L{tuple} of (0) L{dict} mapping L{bytes} to L{IDomain}
            provider, (1) L{bytes}
        @param args: Arguments for L{AliasBase.__init__}.
        N)r:r?rr<r!)r>r!�argss   r"r?zAddressAlias.__init__�s'��	���4�'�$�'��\�\�%�(��
r@�returnc�"�d|j�d�S)z�
        Build a string representation of this L{AddressAlias} instance.

        @rtype: L{bytes}
        @return: A string containing the destination address.
        z	<Address �>)r!rCs r"�__str__zAddressAlias.__str__�s���4�:�:�,�a�(�(r@c�f�|j�jt|j��S)z�
        Create a message receiver which delivers a message to
        the destination address.

        @rtype: L{IMessage <smtp.IMessage>} provider
        @return: A message receiver.
        )rB�existsrr!rCs r"rFz"AddressAlias.createMessageReceiver�s#���{�{�}�#�#�C��
�
�O�4�4r@Nc	��|�i}t|�|vryd|t|�<	|j�jtj|j
ddd�|��S#tj$rYnwxYw|j
j|vr)||j
jj||�SyrE)	rrBrZr�Userr!�SMTPBadRcpt�localrJrGs   r"rJzAddressAlias.resolve�s��� �<��D��t�9������S��Y��	�V�4�;�;�=�'�'��	�	�$�*�*�d�D�$�(O�QU�V�X�X�����	��	���:�:���x�'��D�J�J�,�,�-�5�5�h��E�E�s�AA'�'A=�<A=rK)	rLrMrNrOr?rrXrFrJrPr@r"rRrR�s"���)�)��)�5�r@rRc�4�eZdZdZd�Zd�Zd�Zd�Zdefd�Z	y)	�FileWrappera
    A message receiver which delivers a message to a file.

    @type fp: file-like object
    @ivar fp: A file used for temporary storage of the message.

    @type finalname: L{bytes}
    @ivar finalname: The name of the file in which the message should be
        stored.
    c�D�tj�|_||_y)z�
        @type filename: L{bytes}
        @param filename: The name of the file in which the message should be
            stored.
        N)�tempfile�
TemporaryFiler3�	finalname)r>rs  r"r?zFileWrapper.__init__s���(�(�*���!��r@c�@�|jj|dz�y)z�
        Write a received line to the temporary file.

        @type line: L{bytes}
        @param line: A received line of the message.
        �
N)r3�write�r>rs  r"�lineReceivedzFileWrapper.lineReceiveds��	
���
�
�d�T�k�"r@c���|jjdd�	t|jd�}|5|j|jj��|jj�ddd�tj|j�S#t$r*tjtj��cYSwxYw#1swY�^xYw)ac
        Handle end of message by writing the message to the file.

        @rtype: L{Deferred <defer.Deferred>} which successfully results in
            L{bytes}
        @return: A deferred which succeeds with the name of the file to which
            the message has been stored or fails if the message cannot be
            saved to the file.
        rr7N)
r3�seekr*rd�
BaseExceptionr�failr	�Failurerg�readr/�succeed)r>�fs  r"�eomReceivedzFileWrapper.eomReceiveds���	
�����Q���	1��T�^�^�S�)�A��	�
�G�G�D�G�G�L�L�N�#��G�G�M�M�O�	��}�}�T�^�^�,�,���	1��:�:�g�o�o�/�0�0�	1��	�	�s�B!�AC�!0C�C�C c�F�|jj�d|_y)zG
        Close the temporary file when the connection is lost.
        N)r3r/rCs r"�connectionLostzFileWrapper.connectionLost-s��	
���
�
����r@rUc�"�d|j�d�S)z�
        Build a string representation of this L{FileWrapper} instance.

        @rtype: L{bytes}
        @return: A string containing the file name of the message.
        z
<FileWrapper rW)rdrCs r"rXzFileWrapper.__str__4s���t�~�~�.�a�0�0r@N�
rLrMrNrOr?rirrrtrrXrPr@r"r`r`�s'��	�"�#�-�,�1��1r@r`c�(�eZdZdZd�Zdefd�Zd�Zy)�	FileAliasz_
    An alias which translates an address to a file.

    @ivar filename: See L{__init__}.
    c�>�tj|g|���||_y)a"
        @type filename: L{bytes}
        @param filename: The name of the file in which to store the message.

        @type args: 2-L{tuple} of (0) L{dict} mapping L{bytes} to L{IDomain}
            provider, (1) L{bytes}
        @param args: Arguments for L{AliasBase.__init__}.
        N)r:r?r)r>rrTs   r"r?zFileAlias.__init__Fs��	���4�'�$�'� ��
r@rUc�"�d|j�d�S)z�
        Build a string representation of this L{FileAlias} instance.

        @rtype: L{bytes}
        @return: A string containing the name of the file.
        z<File rW)rrCs r"rXzFileAlias.__str__Rs����
�
��a�(�(r@c�,�t|j�S)z�
        Create a message receiver which delivers a message to the file.

        @rtype: L{FileWrapper}
        @return: A message receiver which writes a message to the file.
        )r`rrCs r"rFzFileAlias.createMessageReceiver[s���4�=�=�)�)r@N)rLrMrNrOr?rrXrFrPr@r"rxrx>s���
!�)��)�*r@rxc��eZdZdZy)�ProcessAliasTimeoutzb
    An error indicating that a timeout occurred while waiting for a process
    to complete.
    N)rLrMrNrOrPr@r"r}r}es��r@r}c�R�eZdZdZdZdZdZeZd
d�Zd�Z	d�Z
d�Zd	�Zd
�Z
defd�Zy)�MessageWrapperaF
    A message receiver which delivers a message to a child process.

    @type completionTimeout: L{int} or L{float}
    @ivar completionTimeout: The number of seconds to wait for the child
        process to exit before reporting the delivery as a failure.

    @type _timeoutCallID: L{None} or
        L{IDelayedCall <twisted.internet.interfaces.IDelayedCall>} provider
    @ivar _timeoutCallID: The call used to time out delivery, started when the
        connection to the child process is closed.

    @type done: L{bool}
    @ivar done: A flag indicating whether the child process has exited
        (C{True}) or not (C{False}).

    @type reactor: L{IReactorTime <twisted.internet.interfaces.IReactorTime>}
        provider
    @ivar reactor: A reactor which will be used to schedule timeouts.

    @ivar protocol: See L{__init__}.

    @type processName: L{bytes} or L{None}
    @ivar processName: The process name.

    @type completion: L{Deferred <defer.Deferred>}
    @ivar completion: The deferred which will be triggered by the protocol
        when the child process exits.
    F�<Nc���||_||_tj�|_|j|j_|jj
|j�|�||_yy)a�
        @type protocol: L{ProcessAliasProtocol}
        @param protocol: The protocol associated with the child process.

        @type process: L{bytes} or L{None}
        @param process: The process name.

        @type reactor: L{None} or L{IReactorTime
            <twisted.internet.interfaces.IReactorTime>} provider
        @param reactor: A reactor which will be used to schedule timeouts.
        N)	�processNamerr�Deferred�
completion�onEnd�addBoth�
_processEndedr)r>r�processrs    r"r?zMessageWrapper.__init__�s[��#��� ��
��.�.�*���"�o�o��
�
�������� 2� 2�3���"�D�L�r@c�p�d|_|j�"|jj�d|_y|S)a�
        Record process termination and cancel the timeout call if it is active.

        @type result: L{Failure <failure.Failure>}
        @param result: The reason the child process terminated.

        @rtype: L{None} or L{Failure <failure.Failure>}
        @return: None, if the process end is expected, or the reason the child
            process terminated, if the process end is unexpected.
        TN)�done�_timeoutCallID�cancel)r>rs  r"r�zMessageWrapper._processEnded�s:����	����*�
���&�&�(�"&�D���Mr@c�n�|jry|jjj|dz�y)z�
        Write a received line to the child process.

        @type line: L{bytes}
        @param line: A received line of the message.
        Nrf)r�r�	transportrgrhs  r"rizMessageWrapper.lineReceived�s*���9�9���
�
���%�%�d�T�k�2r@c���|jsY|jjj�|jj|j|j�|_|jS)z�
        Disconnect from the child process and set up a timeout to wait for it
        to exit.

        @rtype: L{Deferred <defer.Deferred>}
        @return: A deferred which will be called back when the child process
            exits.
        )
r�rr��loseConnectionr�	callLater�completionTimeout�_completionCancelr�r�rCs r"rrzMessageWrapper.eomReceived�sU���y�y��M�M�#�#�2�2�4�"&�,�,�"8�"8��&�&��(>�(>�#�D�����r@c��d|_|jjjd�t	d|j
�d��}d|j_|jjtj|��y)z�
        Handle the expiration of the timeout for the child process to exit by
        terminating the child process forcefully and issuing a failure to the
        L{completion} deferred.
        N�KILLzNo answer after z seconds)r�rr��
signalProcessr}r�r�r��errbackr	rn)r>�excs  r"r�z MessageWrapper._completionCancel�sf��#����
�
���-�-�f�5�!�$4�T�5K�5K�4L�H�"U�V��"��
�
����������� 4�5r@c��y)z9
        Ignore notification of lost connection.
        NrPrCs r"rtzMessageWrapper.connectionLost�s�r@rUc�"�d|j�d�S)z�
        Build a string representation of this L{MessageWrapper} instance.

        @rtype: L{bytes}
        @return: A string containing the name of the process.
        z<ProcessWrapper rW)r�rCs r"rXzMessageWrapper.__str__�s��"�$�"2�"2�!3�1�5�5r@�NN)rLrMrNrOr�r�r�rr?r�rirrr�rtrrXrPr@r"rrlsH���<�D����N��G�#�*�,	3�� 
6��
6��6r@rc��eZdZdZdZd�Zy)�ProcessAliasProtocolz�
    A process protocol which errbacks a deferred when the associated
    process ends.

    @type onEnd: L{None} or L{Deferred <defer.Deferred>}
    @ivar onEnd: If set, a deferred on which to errback when the process ends.
    Nc�T�|j�|jj|�yy)z�
        Call an errback.

        @type reason: L{Failure <failure.Failure>}
        @param reason: The reason the child process terminated.
        N)r�r�)r>�reasons  r"�processEndedz!ProcessAliasProtocol.processEnded�s%���:�:�!��J�J���v�&�"r@)rLrMrNrOr�r�rPr@r"r�r��s���
�E�'r@r�c�2�eZdZdZeZd�Zdefd�Zd�Zd�Z	y)�ProcessAliasa6
    An alias which is handled by the execution of a program.

    @type path: L{list} of L{bytes}
    @ivar path: The arguments to pass to the process. The first string is
        the executable's name.

    @type program: L{bytes}
    @ivar program: The path of the program to be executed.

    @type reactor: L{IReactorTime <twisted.internet.interfaces.IReactorTime>}
        and L{IReactorProcess <twisted.internet.interfaces.IReactorProcess>}
        provider
    @ivar reactor: A reactor which will be used to create and timeout the
        child process.
    c��tj|g|���|j�|_|jd|_y)aX
        @type path: L{bytes}
        @param path: The command to invoke the program consisting of the path
            to the executable followed by any arguments.

        @type args: 2-L{tuple} of (0) L{dict} mapping L{bytes} to L{IDomain}
            provider, (1) L{bytes}
        @param args: Arguments for L{AliasBase.__init__}.
        rN)r:r?r�path�program)r>r�rTs   r"r?zProcessAlias.__init__s3��	���4�'�$�'��J�J�L��	��y�y��|��r@rUc�"�d|j�d�S)z�
        Build a string representation of this L{ProcessAlias} instance.

        @rtype: L{bytes}
        @return: A string containing the command used to invoke the process.
        z	<Process rW)r�rCs r"rXzProcessAlias.__str__.s���4�9�9�+�Q�'�'r@c�<�|jj|||�S)aP
        Spawn a process.

        This wraps the L{spawnProcess
        <twisted.internet.interfaces.IReactorProcess.spawnProcess>} method on
        L{reactor} so that it can be customized for test purposes.

        @type proto: L{IProcessProtocol
            <twisted.internet.interfaces.IProcessProtocol>} provider
        @param proto: An object which will be notified of all events related to
            the created process.

        @type program: L{bytes}
        @param program: The full path name of the file to execute.

        @type path: L{list} of L{bytes}
        @param path: The arguments to pass to the process. The first string
            should be the executable's name.

        @rtype: L{IProcessTransport
            <twisted.internet.interfaces.IProcessTransport>} provider
        @return: A process transport.
        )r�spawnProcess)r>�protor�r�s    r"r�zProcessAlias.spawnProcess7s��0�|�|�(�(����>�>r@c��t�}t||j|j�}|j	||j|j
�|S)z�
        Launch a process and create a message receiver to pass a message
        to the process.

        @rtype: L{MessageWrapper}
        @return: A message receiver which delivers a message to the process.
        )r�rr�rr�r�)r>r�ms   r"rFz"ProcessAlias.createMessageReceiverQsA��
!�"���1�d�l�l�D�L�L�9�����!�T�\�\�4�9�9�5��r@N)
rLrMrNrOrr?rrXr�rFrPr@r"r�r�
s)���"�G�
$�(��(�?�4r@r�c�4�eZdZdZd�Zd�Zd�Zd�Zdefd�Z	y)	�MultiWrapperz�
    A message receiver which delivers a single message to multiple other
    message receivers.

    @ivar objs: See L{__init__}.
    c��||_y)z�
        @type objs: L{list} of L{IMessage <smtp.IMessage>} provider
        @param objs: Message receivers to which the incoming message should be
            directed.
        N)�objs)r>r�s  r"r?zMultiWrapper.__init__hs����	r@c�H�|jD]}|j|��y)z�
        Pass a received line to the message receivers.

        @type line: L{bytes}
        @param line: A line of the message.
        N)r�ri)r>r�os   r"rizMultiWrapper.lineReceivedps#�����	!�A�
�N�N�4� �	!r@c��tj|jD�cgc]}|j���c}�Scc}w)aG
        Pass the end of message along to the message receivers.

        @rtype: L{DeferredList <defer.DeferredList>} whose successful results
            are L{bytes} or L{None}
        @return: A deferred list which triggers when all of the message
            receivers have finished handling their end of message.
        )r�DeferredListr�rr�r>r�s  r"rrzMultiWrapper.eomReceivedzs-���!�!�D�I�I�"F�q�1�=�=�?�"F�G�G��"Fs�<c�F�|jD]}|j��y)zQ
        Inform the message receivers that the connection has been lost.
        N)r�rtr�s  r"rtzMultiWrapper.connectionLost�s#�����	�A�
����	r@rUc�>�dtt|j��d�S)z�
        Build a string representation of this L{MultiWrapper} instance.

        @rtype: L{bytes}
        @return: A string containing a list of the message receivers.
        z<GroupWrapper rW)rrr�rCs r"rXzMultiWrapper.__str__�s�� ��C���� 3�6�a�8�8r@NrvrPr@r"r�r�_s(����!�	H��9��9r@r�c�:�eZdZdZeZd�Zd�Zdefd�Z	d�Z
d	d�Zy)
r1aL
    An alias which points to multiple destination aliases.

    @type processAliasFactory: no-argument callable which returns
        L{ProcessAlias}
    @ivar processAliasFactory: A factory for process aliases.

    @type aliases: L{list} of L{AliasBase} which implements L{IAlias}
    @ivar aliases: The destination aliases.
    c��tj|g|���g|_|�rn|j�j	�}|jd�rh	t
|dd�}|5dj|D�cgc]}|j	���c}�}ddd�|j|jd��n�|jd�r0|jj|j|ddg|����n�|jd�r[tj j#|�rtjd	�nK|jjt%|g|����n%|jjt'|g|����|r��myycc}w#1swY��xYw#t$rtjd|dd���Y�>wxYw)
a�
        Create a group of aliases.

        Parse a list of alias strings and, for each, create an appropriate
        alias object.

        @type items: L{list} of L{bytes}
        @param items: Aliases.

        @type args: n-L{tuple} of (0) L{dict} mapping L{bytes} to L{IDomain}
            provider, (1) L{bytes}
        @param args: Arguments for L{AliasBase.__init__}.
        rr
Nr(rzInvalid filename in alias file �|�/z Directory delivery not supported)r:r?�aliases�poprr.r*�joinrrrlr
r�append�processAliasFactory�osr��isdirrxrR)r>r0rT�addrrq�ls      r"r?zAliasGroup.__init__�st��	���4�'�$�'������9�9�;�$�$�&�D����s�#�2��T�!�"�X��A��@�"�x�x�A�(>�q�����(>�?��@��L�L����C��1�����%����#�#�$<�D�$<�$<�T�!�"�X�$M��$M�N�����%��7�7�=�=��&��G�G�>�?��L�L�'�'�	�$�(>��(>�?����#�#�L��$=��$=�>�'��)?�@�@��%�L��G�G�=�d�1�2�h�\�J�K�L�s0�F"�!F�1F
�F�F�F�"$G	�G	c�,�t|j�S)z�
        Return the number of aliases in the group.

        @rtype: L{int}
        @return: The number of aliases in the group.
        )rr�rCs r"�__len__zAliasGroup.__len__�s���4�<�<� � r@rUc�Z�ddjtt|j��zS)z�
        Build a string representation of this L{AliasGroup} instance.

        @rtype: L{bytes}
        @return: A string containing the aliases in the group.
        z<AliasGroup [%s]>z, )r�rrr�rCs r"rXzAliasGroup.__str__�s#��#�d�i�i��C����0F�&G�H�Hr@c�n�t|jD�cgc]}|j���c}�Scc}w)a,
        Create a message receiver for each alias and return a message receiver
        which will pass on a message to each of those.

        @rtype: L{MultiWrapper}
        @return: A message receiver which passes a message on to message
            receivers for each alias in the group.
        )r�r�rF)r>r7s  r"rFz AliasGroup.createMessageReceiver�s*������M�1�Q�4�4�6�M�N�N��Ms�2Nc��|�i}g}|jD]#}|j|j||���%tt	d|��S)a�
        Map each of the aliases in the group to its ultimate destination.

        @type aliasmap: L{dict} mapping L{bytes} to L{AliasBase}
        @param aliasmap: A mapping of username to alias or group of aliases.

        @type memo: L{None} or L{dict} of L{AliasBase}
        @param memo: A record of the aliases already considered in the
            resolution process.  If provided, C{memo} is modified to include
            this alias.

        @rtype: L{MultiWrapper}
        @return: A message receiver which passes the message on to message
            receivers for the ultimate destination of each alias in the group.
        N)r�r�rJr��filter)r>rHrI�rr7s     r"rJzAliasGroup.resolve�sN�� �<��D������	0�A�
�H�H�Q�Y�Y�x��.�/�	0��F�4��O�,�,r@rK)rLrMrNrOr�r�r?r�rrXrFrJrPr@r"r1r1�s3��	�'��$?�L!�I��I�	O�-r@r1r�)rOr�rb�zope.interfacer�twisted.internetrrr�twisted.mailr�twisted.mail.interfacesr�twisted.pythonr	r
r#r8r:rR�IMessager`rx�	Exceptionr}r�ProcessProtocolr�r�r�r1rPr@r"�<module>r�sU���
��&�5�5��*�'�U�6E�P3,�3,�l
�V��C�9�C��C�L
�T�]�]��B1�B1��B1�J
�V��#*�	�#*��#*�L�)��
�T�]�]��D6�D6��D6�N'�8�3�3�'�,
�V��Q�9�Q��Q�h
�T�]�]��39�39��39�l
�V��f-��f-��f-r@
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!